forked from facebookresearch/DeepSDF
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
145 lines (119 loc) · 3.18 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
FROM nvidia/cudagl:10.2-base-ubuntu18.04
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
git \
vim \
g++ \
gcc \
cmake
WORKDIR /root
RUN apt-get update --fix-missing \
&& apt-get upgrade -y
# Pangolin
RUN git clone https://github.com/stevenlovegrove/Pangolin.git
RUN apt-get install -y \
libgl1-mesa-dev \
libglew-dev \
ffmpeg \
libavcodec-dev \
libavutil-dev \
libavformat-dev \
libswscale-dev \
libavdevice-dev \
libdc1394-22-dev \
libraw1394-dev \
libjpeg-dev \
libpng-dev \
libtiff5-dev \
libopenexr-dev \
libeigen3-dev \
doxygen \
libpython3-all-dev \
libegl1-mesa-dev \
libwayland-dev \
libxkbcommon-dev \
wayland-protocols
RUN apt-get install -y python3.7 python3-pip python3.7-dev
RUN python3.7 -mpip install \
numpy \
pyopengl \
Pillow \
pybind11
RUN cd Pangolin \
&& git submodule init \
&& git submodule update \
&& mkdir build \
&& cd build \
&& cmake .. \
&& cmake --build . \
&& make install
# nanoflann
RUN apt-get install -y \
build-essential \
libgtest-dev \
cmake \
libeigen3-dev
RUN git clone https://github.com/jlblancoc/nanoflann.git \
&& cd nanoflann \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make test \
&& make install \
&& cd .. \
&& mkdir /usr/local/include/nanoflann -p \
&& mkdir /usr/include/nanoflann -p \
&& cp include/nanoflann.hpp /usr/local/include/nanoflann \
&& cp include/nanoflann.hpp /usr/include/nanoflann
# CLI11
RUN git clone https://github.com/CLIUtils/CLI11.git \
&& cd CLI11 \
&& git submodule update --init \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install \
&& GTEST_COLOR=1 CTEST_OUTPUT_ON_FAILURE=1 make test
# variant
RUN git clone https://github.com/mpark/variant.git \
&& mkdir variant/build \
&& cd variant/build \
&& cmake .. \
&& cmake --build . --target install
# anaconda
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH
RUN apt-get update --fix-missing && \
apt-get install -y wget bzip2 ca-certificates curl git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc
# main
WORKDIR /usr/src/sdf
RUN conda install -y -c pytorch \
pytorch \
torchvision \
cpuonly \
scikit-image \
scipy
RUN conda install -c conda-forge trimesh -y
RUN pip install plyfile
COPY . .
RUN mkdir build \
&& cd build \
&& cmake .. \
&& make -j
ENV PANGOLIN_WINDOW_URI headless://
RUN mkdir data/ShapeNetCore.v2 -p
RUN mkdir data/ShapeNetCore.v2-DeepSDF -p
VOLUME /usr/src/sdf/data/ShapeNetCore.v2
VOLUME /usr/src/sdf/data/ShapeNetCore.v2-DeepSDF
CMD ["bash", "-c", "./process_whole_dataset.sh"]