SW777SW commited on
Commit
162a071
·
verified ·
1 Parent(s): b275ef5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +40 -0
Dockerfile ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the pre-built PyTorch Docker image with CUDA
2
+ FROM pytorch/pytorch:2.1.2-cuda11.8-cudnn8-devel
3
+
4
+ # Set up environment variables
5
+ # ENV CONDA_DIR=/opt/conda
6
+ # ENV PATH=$CONDA_DIR/bin:$PATH
7
+
8
+ RUN useradd -m -u 1000 user
9
+ USER user
10
+ ENV PATH="/home/user/.local/bin:$PATH"
11
+
12
+ # Install conda and activate the instantsplat environment
13
+ # RUN apt-get update && apt-get install -y wget git vim && \
14
+ # rm -rf /var/lib/apt/lists/*
15
+
16
+ # Clone the InstantSplat repository and download the pre-trained model
17
+ RUN git clone --recursive https://github.com/NVlabs/InstantSplat.git && \
18
+ cd InstantSplat && \
19
+ git submodule update --init --recursive
20
+ # git submodule update --init --recursive && \
21
+ # cd submodules/dust3r/ && \
22
+ # mkdir -p checkpoints/ && \
23
+ # wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/ && \
24
+ # cd ../../
25
+
26
+ # Create the conda environment and install dependencies
27
+ RUN pip install -r requirements.txt && \
28
+ pip install submodules/simple-knn && \
29
+ sed -i '154s/p_view.z <= 0.2f/p_view.z <= 0.001f/' submodules/diff-gaussian-rasterization/cuda_rasterizer/auxiliary.h && \
30
+ pip install submodules/diff-gaussian-rasterization
31
+
32
+ # Compile the CUDA kernels for RoPE
33
+ RUN cd submodules/dust3r/croco/models/curope/ && \
34
+ python setup.py build_ext --inplace
35
+
36
+ # Set the working directory
37
+ WORKDIR /InstantSplat
38
+
39
+ # Default command to run when the container starts
40
+ CMD ["/bin/bash"]