forked from cvg/Mask3D
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (55 loc) · 2.44 KB
/
Dockerfile
File metadata and controls
69 lines (55 loc) · 2.44 KB
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
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Zurich
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
wget \
curl \
ca-certificates \
ssh \
liboctomap-dev \
libx11-6 \
libxrender1 \
libxext6 \
libgl1-mesa-glx \
libsparsehash-dev \
libopenblas-dev \
tzdata \
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -ms /bin/bash developer
RUN mkdir -p /home/developer/workspace/third_party \
&& chown -R developer:developer /home/developer
RUN wget -q https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O miniforge.sh \
&& chmod +x miniforge.sh \
&& ./miniforge.sh -b -p /opt/conda \
&& rm miniforge.sh \
&& chown -R developer:developer /opt/conda
ENV PATH=/opt/conda/bin:$PATH
COPY --chown=developer:developer environment.yml /tmp/environment.yml
USER developer
ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 6.2 7.0 7.2 7.5 8.0 8.6"
RUN mamba env create -f /tmp/environment.yml -v \
&& conda clean -afy
RUN mamba run -n mask3d_cuda113 pip3 install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
RUN mamba run -n mask3d_cuda113 pip3 install torch-scatter -f https://data.pyg.org/whl/torch-1.12.1+cu113.html
RUN mamba run -n mask3d_cuda113 pip3 install 'git+https://github.com/facebookresearch/detectron2.git@710e7795d0eeadf9def0e7ef957eea13532e34cf' --no-deps
ENV MAX_JOBS=12
WORKDIR /home/developer/workspace/third_party
RUN git clone --recursive "https://github.com/NVIDIA/MinkowskiEngine" \
&& cd MinkowskiEngine \
&& git checkout 02fc608bea4c0549b0a7b00ca1bf15dee4a0b228 \
&& mamba run -n mask3d_cuda113 python setup.py install --force_cuda --blas=openblas
WORKDIR /home/developer/workspace/third_party
RUN git clone https://github.com/ScanNet/ScanNet.git \
&& cd ScanNet/Segmentator \
&& git checkout 3e5726500896748521a6ceb81271b0f5b2c0e7d2 \
&& mamba run -n mask3d_cuda113 make
COPY --chown=developer:developer . /home/developer/workspace
WORKDIR /home/developer/workspace/third_party/pointnet2
RUN mamba run -n mask3d_cuda113 python setup.py install
WORKDIR /home/developer/workspace
RUN mamba run -n mask3d_cuda113 pip install pytorch-lightning==1.7.2
RUN mamba run -n mask3d_cuda113 pip install .