-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (50 loc) · 2.31 KB
/
Dockerfile
File metadata and controls
60 lines (50 loc) · 2.31 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
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
# Set the working directory
WORKDIR /EDGS
# Install system dependencies first, including git, build-essential, and cmake
RUN apt-get update && apt-get install -y \
git \
wget \
build-essential \
cmake \
ninja-build \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy only essential files for cloning submodules first (e.g., .gitmodules)
# Or, if submodules are public, you might not need to copy anything specific for this step
# For simplicity, we'll copy everything, but this could be optimized
COPY . .
# Initialize and update submodules
RUN git submodule init && git submodule update --recursive
# Install Miniconda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
bash /tmp/miniconda.sh -b -p /opt/conda && \
rm /tmp/miniconda.sh
ENV PATH="/opt/conda/bin:${PATH}"
# Create the conda environment and install dependencies
# Accept Anaconda TOS before using conda
RUN conda init bash && \
conda config --set always_yes yes --set changeps1 no && \
conda config --add channels defaults && \
conda config --set channel_priority strict && \
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
# Now you can safely create your environment
RUN conda create -y -n edgs python=3.10 pip && \
conda clean -afy && \
echo "source activate edgs" > ~/.bashrc
# Set CUDA architectures to compile for
ENV TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6;8.9;9.0+PTX"
# Activate the environment and install Python dependencies
RUN /bin/bash -c "source activate edgs && \
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 && \
pip install -e ./submodules/gaussian-splatting/submodules/diff-gaussian-rasterization && \
pip install -e ./submodules/gaussian-splatting/submodules/simple-knn && \
pip install pycolmap wandb hydra-core tqdm torchmetrics lpips matplotlib rich plyfile imageio imageio-ffmpeg && \
pip install -e ./submodules/RoMa && \
pip install gradio plotly scikit-learn moviepy==2.1.1 ffmpeg open3d jupyterlab matplotlib"
# Expose the port for Gradio
EXPOSE 7862
# Keep the container running in detached mode
CMD ["tail", "-f", "/dev/null"]