-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a Dockerfile and instructions to build it #163
Open
sergiobd
wants to merge
6
commits into
graphdeco-inria:main
Choose a base branch
from
sergiobd:docker
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
47d5401
Create Dockerfile
sergiobd 0292f3c
Update README.md for docker instructions
sergiobd 6423a7d
Update README.md
sergiobd b360f6b
Update Dockerfile with default conda env
sergiobd 801b37e
Update Dockerfile
sergiobd 75c0ce9
Update README.md, typo in docker build
sergiobd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,47 @@ | ||
# Use the base image with PyTorch and CUDA support | ||
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel | ||
|
||
|
||
# NOTE: | ||
# Building the libraries for this repository requires cuda *DURING BUILD PHASE*, therefore: | ||
# - The default-runtime for container should be set to "nvidia" in the deamon.json file. See this: https://github.com/NVIDIA/nvidia-docker/issues/1033 | ||
# - For the above to work, the nvidia-container-runtime should be installed in your host. Tested with version 1.14.0-rc.2 | ||
# - Make sure NVIDIA's drivers are updated in the host machine. Tested with 525.125.06 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Update and install tzdata separately | ||
RUN apt update && apt install -y tzdata | ||
|
||
# Install necessary packages | ||
RUN apt install -y git && \ | ||
apt install -y libglew-dev libassimp-dev libboost-all-dev libgtk-3-dev libopencv-dev libglfw3-dev libavdevice-dev libavcodec-dev libeigen3-dev libxxf86vm-dev libembree-dev && \ | ||
apt clean && apt install wget && rm -rf /var/lib/apt/lists/* | ||
|
||
# Create a workspace directory and clone the repository | ||
WORKDIR /workspace | ||
RUN git clone https://github.com/graphdeco-inria/gaussian-splatting --recursive | ||
|
||
# Create a Conda environment and activate it | ||
WORKDIR /workspace/gaussian-splatting | ||
|
||
RUN conda env create --file environment.yml && conda init bash && exec bash && conda activate gaussian_splatting | ||
|
||
# Make gaussian_splatting the default environment on start | ||
RUN echo "conda activate gaussian_splatting" >> /root/.bashrc | ||
|
||
# Tweak the CMake file for matching the existing OpenCV version. Fix the naming of FindEmbree.cmake | ||
WORKDIR /workspace/gaussian-splatting/SIBR_viewers/cmake/linux | ||
RUN sed -i 's/find_package(OpenCV 4\.5 REQUIRED)/find_package(OpenCV 4.2 REQUIRED)/g' dependencies.cmake | ||
RUN sed -i 's/find_package(embree 3\.0 )/find_package(EMBREE)/g' dependencies.cmake | ||
RUN mv /workspace/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindEmbree.cmake /workspace/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindEMBREE.cmake | ||
|
||
# Fix the naming of the embree library in the rayscaster's cmake | ||
RUN sed -i 's/\bembree\b/embree3/g' /workspace/gaussian-splatting/SIBR_viewers/src/core/raycaster/CMakeLists.txt | ||
|
||
# Ready to build the viewer now. | ||
WORKDIR /workspace/gaussian-splatting/SIBR_viewers | ||
RUN cmake -Bbuild . -DCMAKE_BUILD_TYPE=Release && \ | ||
cmake --build build -j24 --target install | ||
|
||
WORKDIR /workspace/gaussian-splatting |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add somewhere ( for CUDA >11.0 )