-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
97 lines (82 loc) · 2.45 KB
/
Dockerfile
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
88
89
90
91
92
93
94
95
96
97
FROM nvidia/cuda:11.1.1-devel-ubuntu20.04
# FROM nvidia/cuda:11.0-devel-ubuntu20.04
# FROM nvidia/cuda:11.1.1-devel-ubuntu20.04
# FROM nvcr.io/nvidia/pytorch:20.01-py3
ENV DEBIAN_FRONTEND noninteractive
# Install some basic utilities
RUN apt-get update && apt-get install -y \
xvfb \
curl \
wget \
llvm \
ca-certificates \
sudo \
git \
bzip2 \
libx11-6 \
gcc \
mono-mcs \
python3-venv \
python3-dev \
vim \
libglu1-mesa-dev \
libsdl2-dev \
libc++-7-dev \
libc++abi-7-dev \
ninja-build \
libxi-dev \
libtbb-dev \
libosmesa6-dev \
libusb-1.0-0-dev \
manpages-dev \
--reinstall build-essential \
llvm-6.0 \
llvm-6.0-tools \
freeglut3 \
freeglut3-dev \
ffmpeg -y \
&& rm -rf /var/lib/apt/lists/*
# Install OSMesa for pyrender
RUN wget https://github.com/mmatl/travis_debs/raw/master/xenial/mesa_18.3.3-0.deb \
&& dpkg -i ./mesa_18.3.3-0.deb || true \
&& apt-get install -f \
&& rm ./mesa_18.3.3-0.deb
# Set python3 as main python
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
# Activate virtuaenv (https://pythonspeed.com/articles/activate-virtualenv-dockerfile/)
ENV VIRTUAL_ENV=/opt/venv
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Install python dependencies
RUN python -m pip install --upgrade pip
# Create a working directory
WORKDIR /app
# Install requirements
COPY docker_requirements.txt .
RUN pip install -r docker_requirements.txt
RUN rm docker_requirements.txt
############################################
# Install dependencies in 'external'
############################################
# - First, copy the 'external' folder directly to the container
ADD external ./external
# - Clone Eigen
# WORKDIR /app/external
# RUN git clone https://gitlab.com/libeigen/eigen.git
# - Clone ChamferDistancePytorch
# WORKDIR /app/external
# RUN git clone https://github.com/ThibaultGROUEIX/ChamferDistancePytorch.git
# - BUild gaps (Thomas Funkhouser)
WORKDIR /app/external
RUN chmod +x build_gaps.sh && ./build_gaps.sh
RUN chmod +x gaps_is_installed.sh && ./gaps_is_installed.sh
# - Some libs from IFNet (Julian Chibane)
WORKDIR /app/external/libmesh/
RUN python setup.py build_ext --inplace
WORKDIR /app/external/libvoxelize/
RUN python setup.py build_ext --inplace
# - Install some cpp helper functions
WORKDIR /app/external/csrc
RUN python setup.py install
# Go back to the main directory
WORKDIR /app