Skip to content

Add Dockerfile for CUDA 12.4-Compatible SpatialLM Environment #32

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikitalokhmachev-ai
Copy link

@nikitalokhmachev-ai nikitalokhmachev-ai commented Mar 27, 2025

Summary

This PR adds a Dockerfile to enable a fully containerized environment for SpatialLM using CUDA 12.4, Python 3.11, and Poetry-based dependency management. It ensures compatibility with torchsparse and simplifies setup for inference, evaluation, and visualization.

Usage

Build the image:

docker build -t spatiallm:cuda12.4 .

Run the container (with GPU and volume mount):

docker run --gpus all -it --rm ^
  -v C:\Path\To\SpatialLM:/workspace/SpatialLM ^
  --name spatiallm spatiallm:cuda12.4

Inside the container:

conda run -n spatiallm python inference.py ...

P.S. Really impressive work on the repo, absolutely loved it! Huge kudos to the team.

@hippoley
Copy link

Hi Nikitalokhmachev,

Thank you again for sharing the Dockerfile — it's been really helpful for getting started.

I’ve been trying to follow the exact steps from the Dockerfile to build the environment on my side. The earlier steps, like downloading Miniconda and creating the spatiallm environment with Python 3.11, all worked well.

However, I consistently run into an issue when it tries to install the CUDA toolkit with this command:

conda run -n spatiallm conda install -c nvidia/label/cuda-12.4.0 cuda-toolkit -y

The process fails with a CondaHTTPError, specifically saying:

HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/nvidia/label/cuda-12.4.0/linux-64/nsight-compute-2024.1.0.13-0.tar.bz2>

It seems like it can’t connect to the NVIDIA conda channel to fetch some large packages (like nsight-compute, libcusparse-dev, etc.). I tried rebuilding the image a few times in case it was just a network hiccup, but the error keeps occurring, usually after downloading several large files.

I also tried updating conda to the latest version and even switching base channels, but the issue persists. I’m building this on a fairly standard setup (Docker on Linux), and I’m starting to wonder if maybe some network proxy or timeout is involved — or perhaps there’s a cleaner way to install just the essential CUDA components without the full visual/debug tooling?

I was wondering — did you ever encounter this issue on your side when building the image? If so, did you find a workaround, like trimming the CUDA packages, using a different channel, or handling it outside of the Dockerfile?

Any advice or suggestions would be really appreciated! I’d love to understand how you handled this part, especially since everything else seems to work well.

Thanks so much in advance for your help — and sorry for the long message! Just wanted to make sure I shared enough detail.

@nikitalokhmachev-ai
Copy link
Author

Hey @hippoley ! Thanks a ton for the detailed message, really appreciate you taking the time to dig into this and share the error so clearly.

I’ve got quite a few commitments at the moment, so I might not be able to dive into it right away. That said, I’ll definitely take a closer look once things ease up in the next few days.
Thanks again for the heads-up, and I’ll circle back with a proper response soon!

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.

2 participants