-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.gpu
39 lines (29 loc) · 1.77 KB
/
Dockerfile.gpu
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
33
34
35
36
37
38
39
FROM nvidia/cuda:10.1-cudnn7-runtime as dev-stage
WORKDIR /usr/src/app
ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" PATH="/opt/venv/bin:$PATH" PIP_NO_CACHE_DIR="false" DISPLAY=":0" CXXFLAGS="-I/opt/venv/lib/python3.6/site-packages/numpy/core/include"
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 python3-pip python3-venv python3-dev build-essential zlib1g-dev libsdl2-dev libjpeg-dev \
wget nasm tar libbz2-dev libgtk2.0-dev cmake git libfluidsynth-dev libgme-dev \
libopenal-dev timidity libwildmidi-dev unzip libboost-all-dev libcanberra-gtk-module \
libopenmpi-dev libosmesa6-dev libgl1-mesa-glx libglfw3 && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN python3 -m venv /opt/venv && \
python3 -m pip install pip==19.3.1 pip-tools==4.2.0 setuptools==44.0.0
RUN echo "https://download.pytorch.org/whl/cu100/torch-1.3.0%2Bcu100-cp36-cp36m-linux_x86_64.whl \
--hash=sha256:2414744c5f9fc25e4ee181019df188b0ea28c7866ce7af13116c4d7e538460b7 \
\n \
https://download.pytorch.org/whl/cu100/torchvision-0.4.1%2Bcu100-cp36-cp36m-linux_x86_64.whl \
--hash=sha256:6a90d52d88dd2e4bc411b1d6b9bf89521b8727228318bf91832f3961c854622c \
\n" >> requirements.txt
RUN python3 -m piptools sync
RUN wget https://github.com/openai/baselines/archive/9ee399f5b20cd70ac0a871927a6cf043b478193f.zip -O baselines.zip && \
unzip baselines.zip && \
cd baselines*/ && \
python3 -m pip install . && \
cd ../ && \
rm -rf baselines*
COPY . .
RUN python3 -m venv /opt/venv && \
python3 -m pip install Pillow==6.2.1 && \
python3 -m pip install -e .