forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_runtime
28 lines (24 loc) · 985 Bytes
/
Dockerfile_runtime
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
FROM ubuntu:16.04
LABEL com.nvidia.volumes.needed="nvidia_driver"
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
ca-certificates \
libjpeg-dev \
libpng-dev && \
rm -rf /var/lib/apt/lists/*
RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda install conda-build && \
/opt/conda/bin/conda install numpy pyyaml scipy ipython&& \
/opt/conda/bin/conda clean -ya
ENV PATH /opt/conda/bin:$PATH
RUN conda install pytorch torchvision cuda90 -c pytorch && /opt/conda/bin/conda clean -ya
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
WORKDIR /workspace
RUN chmod -R a+w /workspace