Skip to content
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
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sergiobd
Copy link

@sergiobd sergiobd commented Sep 5, 2023

  • Based FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel
  • "hacked" some cmake files in order for things to build correctly. Mainly:
    • OpenCV version 4.5 -> 4.2
    • Tweaks to compile Embree library

README.md Outdated Show resolved Hide resolved
@eolivi-fy
Copy link

[BTW: I am simply a user and not a maintainer of this repo]

Although this looks very good, I could not run it, see the extract log of the docker build
gaussian-splatting_docker.log
For information, my host is ubuntu20.04 , CUDA 11.8, driver 525.116.04, NVIDIA GeForce RTX 3080

@reconlabs-sergio
Copy link

reconlabs-sergio commented Sep 6, 2023

It seems that CUDA is not available during build. Did you set nvidia as the default runtime in daemon.json as indicated?
See: NVIDIA/nvidia-docker#1033

Your host's /etc/docker/daemon.json should look like this:

{
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    },
    "default-runtime": "nvidia"
}

After doing this, restart docker with sudo systemctl restart docker

@eolivi-fy
Copy link

eolivi-fy commented Sep 6, 2023

Actually this was due to a missing variable, as explained in pytorch/extension-cpp#71
As I have CUDA >= 11.x, I had to add this:

ARG TORCH_CUDA_ARCH_LIST="3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX"

to the Dockerfile.
It now builds correctly and is usable. Thanks for help ;-)


# Create a Conda environment and activate it
WORKDIR /workspace/gaussian-splatting

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 )

ARG TORCH_CUDA_ARCH_LIST="3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX"

@brgrp
Copy link

brgrp commented Sep 30, 2023

Tested, works great with cuda 12

@ookami125 ookami125 mentioned this pull request Oct 4, 2023
@Sridhar701Pitt
Copy link

It seems that CUDA is not available during build. Did you set nvidia as the default runtime in daemon.json as indicated? See: NVIDIA/nvidia-docker#1033

Your host's /etc/docker/daemon.json should look like this:

{
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    },
    "default-runtime": "nvidia"
}

After doing this, restart docker with sudo systemctl restart docker

This step still might not be enough with newer docker versions. In addition to updating the default runtime build your image with:

DOCKER_BUILDKIT=0 docker build -t gaussian_splatting .

Reference: https://stackoverflow.com/questions/59691207/docker-build-with-nvidia-runtime/75629058#75629058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants