-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c8009b
commit 960d35c
Showing
7 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"workbench.colorCustomizations": { | ||
"activityBar.background": "#22312D", | ||
"titleBar.activeBackground": "#30443F", | ||
"titleBar.activeForeground": "#F8FAF9" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Use an official CUDA runtime as the base image | ||
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04 | ||
|
||
# Set environment variables | ||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
CONDA_DIR=/opt/conda \ | ||
CUDA_HOME=/usr/local/cuda \ | ||
TORCH_CUDA_ARCH_LIST="7.5" | ||
|
||
# Add Conda to PATH | ||
ENV PATH=$CONDA_DIR/bin:$PATH | ||
|
||
# Install system dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
wget \ | ||
build-essential \ | ||
libgl1-mesa-glx \ | ||
libglib2.0-0 \ | ||
python3-dev \ | ||
python3-pip \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# 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 $CONDA_DIR && \ | ||
rm /tmp/miniconda.sh && \ | ||
$CONDA_DIR/bin/conda clean -afy | ||
|
||
# Initialize Conda | ||
RUN $CONDA_DIR/bin/conda init bash | ||
|
||
# Clone the GaussianPro repository | ||
RUN git clone https://github.com/kcheng1021/GaussianPro.git --recursive | ||
|
||
# Set the working directory | ||
WORKDIR /GaussianPro | ||
|
||
# Copy environment.yml into the Docker image | ||
COPY environment.yml . | ||
|
||
# Create the Conda environment and install additional packages | ||
# RUN /opt/conda/bin/conda env create -f environment.yml | ||
|
||
# Activate the environment | ||
RUN echo "source /opt/conda/etc/profile.d/conda.sh" >> /root/.bashrc && \ | ||
echo "conda activate gaussianpro" >> /root/.bashrc | ||
|
||
# Create the Conda environment, install packages, and clean up in one RUN command | ||
RUN /bin/bash -c "source $CONDA_DIR/etc/profile.d/conda.sh && \ | ||
conda env create -f environment.yml && \ | ||
conda activate gaussianpro && \ | ||
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.6 -c pytorch -c conda-forge && \ | ||
pip install --upgrade pip && \ | ||
pip install ./submodules/Propagation && \ | ||
pip install ./submodules/diff-gaussian-rasterization && \ | ||
pip install ./submodules/simple-knn && \ | ||
conda clean -afy" | ||
|
||
# Copy the entrypoint script into the Docker image | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
# Make the entrypoint script executable | ||
RUN chmod +x /entrypoint.sh | ||
|
||
# Set the entrypoint to the script that activates the Conda environment | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
# Set the default command to bash to keep the container running | ||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker build --no-cache -t gaussian-pro . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Initializing Conda..." | ||
source /opt/conda/etc/profile.d/conda.sh | ||
|
||
echo "Activating Conda environment 'gaussianpro'..." | ||
conda activate gaussianpro | ||
|
||
echo "Conda environment activated: $(conda info --envs | grep '*' )" | ||
|
||
if [ "$#" -gt 0 ]; then | ||
echo "Executing command: $@" | ||
exec "$@" | ||
else | ||
echo "Starting interactive bash shell..." | ||
exec bash | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: gaussianpro | ||
channels: | ||
- pytorch | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- cudatoolkit=11.7 | ||
- plyfile=0.8.1 | ||
- python=3.7.13 | ||
- pip=22.3.1 | ||
- tqdm | ||
- ninja | ||
- opencv-python=4.10.0.84 | ||
- matplotlib=3.5.3 | ||
- open3d=0.17.0 | ||
- imageio=2.31.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
docker run --rm --gpus all -it \ | ||
--entrypoint /bin/bash \ | ||
-v your_dataset_path:/GaussianPro/datasets \ | ||
gaussian-pro |