Skip to content

Fix IgGM container: install cuda-nvcc and set CUDA_HOME - #1

Merged
pansapiens merged 1 commit into
mainfrom
fix/iggm-cuda-home-nvcc
Aug 12, 2026
Merged

Fix IgGM container: install cuda-nvcc and set CUDA_HOME#1
pansapiens merged 1 commit into
mainfrom
fix/iggm-cuda-home-nvcc

Conversation

@pansapiens

Copy link
Copy Markdown
Collaborator

Summary

  • Running the IgGM image with docker run --gpus all / apptainer exec --nv crashes on startup during import deepspeed:
    deepspeed.ops.op_builder.builder.MissingCUDAException: CUDA_HOME does not exist, unable to compile CUDA op(s)
    
  • environment.yaml only pulls in the CUDA runtime (cudatoolkit/cuda-runtime), not the nvcc compiler, so torch.utils.cpp_extension.CUDA_HOME is never set. DeepSpeed checks this unconditionally while importing itself (in git_version_info.py -> op_builder.is_compatible()), before the repo's own except ImportError guard around from deepspeed.ops.deepspeed4science import DS4Sci_EvoformerAttention (IgGM/model/module/attention/gating_multihead_attention.py) gets a chance to catch it — so it is not silently skipped.
  • Fix: install cuda-nvcc=11.7 (matching the pinned cudatoolkit=11.7.1) alongside the pytorch/pytorch-cuda reinstall step, and set ENV CUDA_HOME="${ENV_DIR}" so $CUDA_HOME/bin/nvcc resolves inside the conda env.

Test plan

  • Downloaded the current 2026-05-28_06abc56_nv-cuda11_weights image and reproduced the crash on an M3 GPU node (A40) via apptainer exec --nv ... python /app/design.py ....
  • Confirmed cuda-nvcc=11.7.99 exists in the nvidia conda channel, matching the pinned cudatoolkit=11.7.1/cuda-runtime=11.7.1.
  • Rebuild the image with this Dockerfile change and re-run the same GPU smoke test to confirm design.py runs past the deepspeed import.

Without a compiler toolkit, torch.utils.cpp_extension.CUDA_HOME stays
unset, and deepspeed's op_builder raises MissingCUDAException while
importing deepspeed itself (before the code's own `except ImportError`
guard around DS4Sci_EvoformerAttention can catch it), crashing
design.py on start with:

  deepspeed.ops.op_builder.builder.MissingCUDAException: CUDA_HOME does not exist

Add cuda-nvcc=11.7 (matching the pinned cudatoolkit=11.7.1) and point
CUDA_HOME at the conda env so deepspeed's compatibility check succeeds.
@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@pansapiens
pansapiens merged commit d32d46f into main Aug 12, 2026
1 of 2 checks passed
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.

1 participant