Skip to content

Commit dcffc32

Browse files
committed
Update Dockerfile and README
1 parent 7802a94 commit dcffc32

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

Dockerfile

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
FROM yummybian/docker-darknet:latest
22

3-
ENV KAI-REPO kai-repo
43

54
# Working directory
65
WORKDIR /kai-service
76

8-
go get https://github.com/ZanLabs/kai.git
9-
107
# Download And Install Kai
11-
RUN git clone https://github.com/ZanLabs/kai.git KAI-REPO && \
12-
cd KAI-REPO && \
13-
go install && \
14-
mv kai .. && \
15-
mv cfg .. && \
16-
mv data .. && \
17-
mv config.yaml .. && \
18-
cd .. && \
19-
rm -rf KAI-REPO
8+
RUN go get -u github.com/ZanLabs/kai && \
9+
go install github.com/ZanLabs/kai && \
10+
cp /go/bin/kai ./kai
11+
12+
# Copy configurations
13+
RUN cp -Ra /go/src/github.com/ZanLabs/kai/cfg ./ && \
14+
cp -Ra /go/src/github.com/ZanLabs/kai/data ./ && \
15+
cp /go/src/github.com/ZanLabs/kai/config.yaml ./config.yaml
2016

2117
# Download weights
2218
RUN curl -O http://pjreddie.com/media/files/yolo.weights >/dev/null 2>&1
2319

24-
CMD [ "./kai" ]
25-
26-
20+
EXPOSE 8000
2721

22+
ENTRYPOINT [ "./kai" ]

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
- support S3 download and upload
1313
- support Ftp download and upload
1414

15+
## Precondition
16+
- nvidia-docker 2.0
17+
- CUDA
18+
- cudnn
19+
20+
## Docker
21+
```bash
22+
git pull yummybian/kai
23+
sudo docker run --runtime nvidia -it --rm -p 8000:8000 -v /path/to/config.yaml:/kai-service/config.yaml yummybian/kai bash
24+
or
25+
sudo docker run --runtime nvidia -d --name kai -p 8000:8000 -v /path/to/config.yaml:/kai-service/config.yaml yummybian/kai
26+
```
27+
1528
## Setting Up
1629

1730
First make sure you have [go-yolo](https://github.com/ZanLabs/go-yolo) installed on your machine.

0 commit comments

Comments
 (0)