Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +22 -26
Dockerfile
CHANGED
|
@@ -5,15 +5,6 @@ FROM pytorch/pytorch:2.1.2-cuda11.8-cudnn8-devel
|
|
| 5 |
RUN apt-get update -y && apt-get install -y wget git vim ninja-build \
|
| 6 |
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
|
| 7 |
|
| 8 |
-
# Clone the InstantSplat repository and download the pre-trained model
|
| 9 |
-
RUN git clone --recursive https://github.com/NVlabs/InstantSplat.git && \
|
| 10 |
-
cd InstantSplat && \
|
| 11 |
-
git submodule update --init --recursive && \
|
| 12 |
-
cd submodules/dust3r/ && \
|
| 13 |
-
mkdir -p checkpoints/ && \
|
| 14 |
-
wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/ && \
|
| 15 |
-
cd ../../
|
| 16 |
-
|
| 17 |
# Set up environment variables
|
| 18 |
ENV CUDA_HOME=/usr/local/cuda
|
| 19 |
# ENV CONDA_DIR=/opt/conda
|
|
@@ -22,6 +13,23 @@ ENV CUDA_HOME=/usr/local/cuda
|
|
| 22 |
# Set CUDA architecture flags
|
| 23 |
ENV TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6"
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
# Create the conda environment and install dependencies
|
| 26 |
# RUN conda update -n base -c defaults conda
|
| 27 |
|
|
@@ -35,29 +43,17 @@ ENV TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6"
|
|
| 35 |
# sed -i '154s/p_view.z <= 0.2f/p_view.z <= 0.001f/' submodules/diff-gaussian-rasterization/cuda_rasterizer/auxiliary.h && \
|
| 36 |
# pip install submodules/diff-gaussian-rasterization
|
| 37 |
|
| 38 |
-
|
| 39 |
-
RUN cd InstantSplat && \
|
| 40 |
-
pip install -r requirements.txt
|
| 41 |
-
|
| 42 |
-
RUN cd InstantSplat && \
|
| 43 |
-
pip install submodules/simple-knn && \
|
| 44 |
-
sed -i '154s/p_view.z <= 0.2f/p_view.z <= 0.001f/' submodules/diff-gaussian-rasterization/cuda_rasterizer/auxiliary.h && \
|
| 45 |
-
pip install submodules/diff-gaussian-rasterization && \
|
| 46 |
-
cd submodules/dust3r/croco/models/curope/ && \
|
| 47 |
-
python setup.py build_ext --inplace
|
| 48 |
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
RUN useradd -m -u 1000 user
|
| 51 |
USER user
|
| 52 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 53 |
|
| 54 |
-
COPY --chown=user run_train_infer.sh
|
| 55 |
-
RUN chmod +x
|
| 56 |
-
|
| 57 |
-
# Set the working directory
|
| 58 |
-
WORKDIR InstantSplat/
|
| 59 |
|
| 60 |
-
RUN chown -R user:user /workspace/InstantSplat
|
| 61 |
|
| 62 |
# Default command to run when the container starts
|
| 63 |
CMD ["/bin/bash", "run_train_infer.sh"]
|
|
|
|
| 5 |
RUN apt-get update -y && apt-get install -y wget git vim ninja-build \
|
| 6 |
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
# Set up environment variables
|
| 9 |
ENV CUDA_HOME=/usr/local/cuda
|
| 10 |
# ENV CONDA_DIR=/opt/conda
|
|
|
|
| 13 |
# Set CUDA architecture flags
|
| 14 |
ENV TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6"
|
| 15 |
|
| 16 |
+
# Clone the InstantSplat repository and download the pre-trained model
|
| 17 |
+
RUN git clone --recursive https://github.com/NVlabs/InstantSplat.git app/ && \
|
| 18 |
+
cd app && \
|
| 19 |
+
git submodule update --init --recursive && \
|
| 20 |
+
cd submodules/dust3r/ && \
|
| 21 |
+
mkdir -p checkpoints/ && \
|
| 22 |
+
wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/
|
| 23 |
+
|
| 24 |
+
RUN useradd -m -u 1000 user
|
| 25 |
+
WORKDIR /app
|
| 26 |
+
|
| 27 |
+
RUN pip install submodules/simple-knn && \
|
| 28 |
+
sed -i '154s/p_view.z <= 0.2f/p_view.z <= 0.001f/' submodules/diff-gaussian-rasterization/cuda_rasterizer/auxiliary.h && \
|
| 29 |
+
pip install submodules/diff-gaussian-rasterization && \
|
| 30 |
+
cd submodules/dust3r/croco/models/curope/ && \
|
| 31 |
+
python setup.py build_ext --inplace
|
| 32 |
+
|
| 33 |
# Create the conda environment and install dependencies
|
| 34 |
# RUN conda update -n base -c defaults conda
|
| 35 |
|
|
|
|
| 43 |
# sed -i '154s/p_view.z <= 0.2f/p_view.z <= 0.001f/' submodules/diff-gaussian-rasterization/cuda_rasterizer/auxiliary.h && \
|
| 44 |
# pip install submodules/diff-gaussian-rasterization
|
| 45 |
|
| 46 |
+
# Set the working directory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 49 |
+
RUN pip install -r requirements.txt
|
| 50 |
|
|
|
|
| 51 |
USER user
|
| 52 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 53 |
|
| 54 |
+
COPY --chown=user ./run_train_infer.sh run_train_infer.sh
|
| 55 |
+
RUN chmod +x run_train_infer.sh
|
|
|
|
|
|
|
|
|
|
| 56 |
|
|
|
|
| 57 |
|
| 58 |
# Default command to run when the container starts
|
| 59 |
CMD ["/bin/bash", "run_train_infer.sh"]
|