-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.gpu
executable file
·56 lines (41 loc) · 1.21 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM tensorflow/tensorflow:2.3.0-gpu
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ARG NB_USER
ARG NB_UID
ENV USER ${NB_USER}
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
--home ${HOME} \
${NB_USER}
USER root
RUN apt-get update
RUN apt-get install -y wget rsync git \
xorg-dev \
libglu1-mesa libgl1-mesa-dev \
xvfb \
libxinerama1 libxcursor1 \
python-opengl \
&& rm -rf /var/lib/apt/lists/*
COPY environment-gpu.yml /src/environment-gpu.yml
RUN chown -R ${NB_USER}:${NB_USER} ${HOME}
RUN chown -R ${NB_USER}:${NB_USER} /src
WORKDIR ${HOME}
USER ${NB_UID}
RUN wget \
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir ${HOME}/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
ENV PATH="${HOME}/miniconda3/bin:${PATH}"
RUN conda env create -f /src/environment-gpu.yml
ENV PATH ${HOME}/miniconda3/envs/flatland-rl/bin:$PATH
ENV CONDA_DEFAULT_ENV flatland-rl
ENV CONDA_PREFIX ${HOME}/miniconda3/envs/flatland-rl
ENV CUDA_VISIBLE_DEVICES=0
SHELL ["/bin/bash", "-c"]
EXPOSE 8265
CMD conda --version && nvidia-smi