69 lines
2.2 KiB
Docker
69 lines
2.2 KiB
Docker
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 \
|
|
&& 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} \
|
|
-f https://download.pytorch.org/whl/cu${CUDA_TAG} \
|
|
-f https://download.pytorch.org/whl/torch_stable.html
|
|
|
|
|
|
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 npm@8.5.4
|
|
COPY package.json package-lock.json ./
|
|
RUN npm install
|