Spaces:
Paused
Paused
Download Dockerfile from SW777SW/InstantSplatDocker: direct link, hf CLI and curl.
- Browser
- Download file 2.15 kB
-
https://huggingface.co/spaces/SW777SW/InstantSplatDocker/resolve/5e7d472c89494880098e3f7ac2402e893c91ea86/Dockerfile
- Command line
-
hf download hf://spaces/SW777SW/InstantSplatDocker@5e7d472c89494880098e3f7ac2402e893c91ea86/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/SW777SW/InstantSplatDocker/resolve/5e7d472c89494880098e3f7ac2402e893c91ea86/Dockerfile
2.15 kB
| # 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"] |