forked from rai-project/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
32 lines (21 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM c3sr/go-pytorch:amd64-cpu-pytorch1.8.1-latest
# Install any system dependencies up here
# go 15 is old enough that python3 is just 3.7 which is the highest version go-python works with
RUN apt-get update && apt-get -qq install apt-utils python3 python3-dev python3-pip python3-setuptools ffmpeg libsm6 libxext6 libglib2.0-dev -y
RUN pip3 install --upgrade pip wheel && \
pip3 install absl-py numpy torchvision===0.9.1 scipy pycocotools tokenization opencv-python transformers===2.4.0 nnunet
# Make our go directory structure
RUN mkdir -p /go/src/github.com/c3sr/pytorch
WORKDIR /go/src/github.com/c3sr/pytorch
# Handle Go Depedencies and cache it as a layer
COPY go.* ./
#COPY dlframework/go.mod dlframework/
#COPY dldataset/go.mod dldataset/
RUN go mod download
# Get the rest of the project in
COPY . .
RUN cd pytorch-agent && \
go install -a -tags=nogpu -installsuffix cgo
CMD ["/go/bin/pytorch-agent", "worker"]
# For development runs:
# docker run -it --rm --name pytorch-agent -e MQ_USER=guest -e MQ_PASSWORD=guest -e MQ_HOST=host.docker.internal -e MQ_PORT=5672 pytorch