Spaces:
Paused
Paused
File size: 2,154 Bytes
fb10185 162a071 c99f265 162a071 c95d7f4 162a071 5e7d472 971e755 05739aa 47c73d7 bf65c57 162a071 316df83 162a071 bf65c57 162a071 8777284 162a071 | 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 | # Use the pre-built PyTorch Docker image with CUDA
FROM pytorch/pytorch:2.1.2-cuda11.8-cudnn8-devel
# Install build deps
RUN apt-get update -y && apt-get install -y wget git vim \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
# Clone the InstantSplat repository and download the pre-trained model
RUN git clone --recursive https://github.com/NVlabs/InstantSplat.git && \
cd InstantSplat && \
git submodule update --init --recursive
# git submodule update --init --recursive && \
# cd submodules/dust3r/ && \
# mkdir -p checkpoints/ && \
# wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/ && \
# cd ../../
# Set up environment variables
ENV CONDA_DIR=/opt/conda
ENV PATH=$CONDA_DIR/bin:$PATH
# Create the conda environment and install dependencies
RUN conda update -n base -c defaults conda
RUN conda create -n instantsplat python=3.11 cmake=3.14.0 -y && \
echo "source activate instantsplat" > ~/.bashrc && \
/bin/bash -c "source activate instantsplat" && \
conda install pytorch torchvision pytorch-cuda=12.1 -c pytorch -c nvidia -y && \
cd InstantSplat && \
pip install -r requirements.txt && \
pip install submodules/simple-knn && \
sed -i '154s/p_view.z <= 0.2f/p_view.z <= 0.001f/' submodules/diff-gaussian-rasterization/cuda_rasterizer/auxiliary.h && \
pip install submodules/diff-gaussian-rasterization
# # Create the conda environment and install dependencies
# RUN cd InstantSplat && \
# pip install -r requirements.txt && \
# pip install submodules/simple-knn && \
# sed -i '154s/p_view.z <= 0.2f/p_view.z <= 0.001f/' submodules/diff-gaussian-rasterization/cuda_rasterizer/auxiliary.h && \
# pip install submodules/diff-gaussian-rasterization
# Compile the CUDA kernels for RoPE
RUN cd InstantSplat/submodules/dust3r/croco/models/curope/ && \
python setup.py build_ext --inplace
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set the working directory
WORKDIR /InstantSplat
# Default command to run when the container starts
CMD ["/bin/bash"] |