Skip to content

Conversation

@Mars122
Copy link

@Mars122 Mars122 commented Nov 15, 2025

Title: DX: Make runtime imports reliable and harden setup for CUDA extension builds

Summary

This PR improves the out-of-the-box runtime experience by ensuring local module imports work and by making the CUDA extension build path more robust:

  • Scripts now export PYTHONPATH to include the repo root and src/ so import src.* works regardless of environment.
  • setup.sh sets CMAKE_PREFIX_PATH from Torch, CUDA header paths (CPATH), and CUDA_HOME, and builds RaDe-GS submodules with --no-build-isolation when available. ffmpeg install is guarded.

Changes

  • scripts/infer.sh: export PYTHONPATH with $(pwd):$(pwd)/src
  • scripts/train.sh: export PYTHONPATH with $(pwd):$(pwd)/src
  • settings/setup.sh:
    • Export CUDA_HOME and CPATH
    • Set CMAKE_PREFIX_PATH via torch.utils.cmake_prefix_path when available
    • Clone RaDe-GS with --recursive --depth 1
    • Install diff-gaussian-rasterization (and simple-knn if present) with --no-build-isolation
    • Guard ffmpeg apt-get under sudo/apt presence

Motivation

Some users encounter ModuleNotFoundError: No module named 'src' depending on how scripts are launched, and CUDA extension builds may fail without explicit Torch/CUDA path hints. This PR makes both paths more reliable without changing core logic.

Notes

  • No changes to the core training/inference code.
  • All changes are optional and best-effort; they avoid failing on environments where certain tools are unavailable.

License

  • Shell script adjustments only.

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