-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.spinningup
36 lines (29 loc) · 1.25 KB
/
Dockerfile.spinningup
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
# Build a docker image containing:
# * PyTorch with Cuda support
# * OpenAI Spinning Up
# * Kraby Gym environments
# * Jupyter Notebook
FROM pytorch/pytorch:1.5-cuda10.1-cudnn7-runtime
# Install Git and OpenMPI
RUN apt-get update && \
apt-get install -y git libopenmpi-dev && \
rm -rf /var/lib/apt/lists/*
# Install requirements
RUN pip install cloudpickle==1.2.1 gym[atari,box2d,classic_control]~=0.15.3 ipython joblib matplotlib==3.1.1 mpi4py numpy pandas pytest psutil scipy seaborn==0.8.1 tqdm "tensorflow>=1.8.0,<2.0"
# Install OpenAI Spinning Up
RUN git clone --depth=1 https://github.com/openai/spinningup.git /opt/spinningup && \
cd /opt/spinningup && \
pip install -e . --no-deps
RUN mkdir /opt/spinningup/data && chmod a+rwx /opt/spinningup/data
# Install Jupyter Notebook
RUN pip install --no-cache-dir jupyter matplotlib
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
RUN pip install --no-cache-dir ipykernel==5.1.1 nbformat==4.4.0
RUN mkdir /.local && chmod a+rwx /.local
# Copy and install gym_kraby
WORKDIR /workdir
COPY . /workdir
RUN pip install -e .
# Launch Jupyter Notebook by default on :8888
EXPOSE 8888
CMD jupyter notebook --ip 0.0.0.0 --no-browser --notebook-dir=/workdir/notebooks/spinningup