-
Notifications
You must be signed in to change notification settings - Fork 562
/
Dockerfile.base
68 lines (58 loc) · 2.15 KB
/
Dockerfile.base
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
62
63
64
65
66
67
68
ARG CUDA_VERSION=11.6.1
ARG CUDNN_VERSION=8
FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VERSION}-devel-ubuntu20.04
ARG PYTHON_VERSION=3.8
ENV PYTHON_VERSION=${PYTHON_VERSION}
ARG PYTORCH_VERSION=1.13.1
ENV PYTORCH_VERSION=${PYTORCH_VERSION}
RUN echo "Acquire { https::Verify-Peer false }" > /etc/apt/apt.conf.d/99verify-peer.conf \
&& if [ -f /etc/apt/sources.list.d/cuda.list ]; then \
rm /etc/apt/sources.list.d/cuda.list; \
fi \
&& if [ -f /etc/apt/sources.list.d/nvidia-ml.list ]; then \
rm /etc/apt/sources.list.d/nvidia-ml.list; \
fi \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated ca-certificates \
&& rm /etc/apt/apt.conf.d/99verify-peer.conf \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
unzip \
gfortran \
libopenblas-dev \
liblapack-dev \
libgtk2.0-0 \
libgtk-3-0 \
libgbm-dev \
libnotify-dev \
libgconf-2-4 \
libnss3 \
libxss1 \
libasound2 \
libxtst6 \
xauth \
xvfb \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda install -y python=${PYTHON_VERSION} && \
/opt/conda/bin/conda clean -ya
ENV PATH /opt/conda/bin:$PATH
RUN CUDA_MAJOR="$(echo ${CUDA_VERSION} | cut -d'.' -f1)" && \
CUDA_MINOR="$(echo ${CUDA_VERSION} | cut -d'.' -f2)" && \
CUDA_TAG="$(echo ${CUDA_MAJOR}${CUDA_MINOR})" && \
pip install --no-cache-dir torch==${PYTORCH_VERSION}+cu${CUDA_TAG} torchvision \
--index-url https://download.pytorch.org/whl/cu${CUDA_TAG}
WORKDIR /tmp
RUN curl -fsSL https://deb.nodesource.com/setup_16.x --insecure | bash - \
&& apt-get install -y nodejs
RUN conda list > conda_build.txt
### Install Dash3D Requirements ###
RUN npm install -g [email protected]
COPY package.json package-lock.json ./
RUN npm install