This repository was archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathDockerfile-bionic
61 lines (45 loc) · 1.61 KB
/
Dockerfile-bionic
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
57
58
59
60
61
# -*- mode: dockerfile -*-
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
ARG PYTHON_VERSION=3.8
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-get update && apt-get install -yq \
bison \
build-essential \
ca-certificates \
cmake \
curl \
flex \
git \
gpg \
libbz2-dev \
ninja-build \
software-properties-common \
wget
WORKDIR /opt/conda_setup
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \
| gpg --dearmor - \
> /usr/share/keyrings/kitware-archive-keyring.gpg
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' \
> /etc/apt/sources.list.d/kitware.list
RUN apt-get update && apt-get install -yq \
cmake \
kitware-archive-keyring
RUN curl -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x miniconda.sh && \
./miniconda.sh -b -p /opt/conda && \
/opt/conda/bin/conda install -y python=$PYTHON_VERSION && \
/opt/conda/bin/conda clean -ya
ENV PATH /opt/conda/bin:$PATH
RUN python -m pip install --upgrade pip ipython ipdb
COPY . /opt/nle/
WORKDIR /opt/nle
RUN pip install '.[all]'
WORKDIR /workspace
CMD ["/bin/bash"]
# Docker commands:
# docker rm nle -v
# docker build -t nle -f docker/Dockerfile-bionic .
# docker run --gpus all --rm --name nle nle
# or
# docker run --gpus all -it --entrypoint /bin/bash nle