-
Notifications
You must be signed in to change notification settings - Fork 574
/
Copy pathDockerfile.install
87 lines (71 loc) · 2.33 KB
/
Dockerfile.install
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
# used for cross-compilation in docker build
ARG FORCE_CUDA=1
ENV FORCE_CUDA=${FORCE_CUDA}
ARG IGNORE_TORCH_VER=0
ENV IGNORE_TORCH_VER=${IGNORE_TORCH_VER}
RUN 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
WORKDIR /kaolin
COPY . .
RUN echo "Acquire { https::Verify-Peer false }" > /etc/apt/apt.conf.d/99verify-peer.conf \
&& apt-get -y 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 \
libgl1-mesa-dev \
libgles2-mesa-dev \
libegl1-mesa-dev \
git \
pkg-config \
libatk1.0-0 \
libatk-bridge2.0-0 \
libasound2 \
libgtk2.0-0 \
libgtk-3-0 \
libnss3 \
libglvnd0 \
libgl1 \
libglx0 \
libegl1 \
libgles2 \
libglvnd-dev \
curl \
cmake \
xvfb \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# fix for a weird pytorch bug (see: https://discuss.pytorch.org/t/not-able-to-include-cusolverdn-h/169122/5)
ENV PATH /usr/local/cuda/bin:$PATH
# for GLEW
ENV LD_LIBRARY_PATH /usr/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib:${LD_LIBRARY_PATH}
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,graphics
## Install Dash3D Requirements ###
ENV NODE_OPTIONS=
RUN curl -fsSL https://deb.nodesource.com/setup_16.x --insecure | bash - \
&& apt-get install -y nodejs
RUN npm install -g [email protected]
RUN npm install
RUN pip install --upgrade pip && \
pip install --no-cache-dir ninja \
imageio imageio-ffmpeg && \
pip install --no-cache-dir \
-r tools/viz_requirements.txt \
-r tools/requirements.txt \
-r tools/build_requirements.txt
RUN cd /tmp && \
git clone https://github.com/NVlabs/nvdiffrast && \
cd nvdiffrast && \
cp ./docker/10_nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json && \
pip install .
RUN export MAX_JOBS=1 && python setup.py develop