Skip to content

Update torch - #446

Open
genevera wants to merge 6 commits into
Haidra-Org:mainfrom
genevera:update_torch
Open

Update torch#446
genevera wants to merge 6 commits into
Haidra-Org:mainfrom
genevera:update_torch

Conversation

@genevera

Copy link
Copy Markdown

Update PyTorch to CUDA 13.0 Support with Latest Dependencies

🎯 Summary

This PR upgrades the horde-worker-reGen worker codebase from PyTorch cu128 (CUDA 12.4) to cu130 (CUDA 13.1), along with Python version bump and refreshed dependency requirements for improved stability and compatibility with newer GPU hardware.

🔧 What's Changed

  • PyTorch Upgrade: Migrated from CUDA 12.4 (cu128) to CUDA 13.1 (cu130) across all build configurations
  • Python Version: Updated default Python version from 3.11 to 3.12 in Docker builds
  • New requirements.txt: Added properly structured pip requirements with explicit PyTorch installation instructions and additional dependencies (certifi, babel) for SSL and locale support
  • entrypoint.sh permissions: Fixed executable bit set on the entrypoint script
  • Dependency updates: Refreshed horde packages to their latest versions:
    • horde_sdk~=0.17.1
    • horde_safety~=0.2.3
    • horde_engine~=2.20.12
    • horde_model_reference>=0.9.2
  • Documentation: Updated README files to reflect new installation commands and build arguments

📦 Files Modified (10 total)

File Changes
Dockerfiles/Dockerfile.cuda CUDA 13.1, Python 3.12, added requirements.txt COPY instruction
Dockerfiles/README.md Updated build argument docs to reflect cu130
Dockerfiles/compose.cuda.yaml Updated compose args for new versions
Dockerfiles/entrypoint.sh Fixed executable permissions, updated pip install command
Dockerfiles/requirements.txt New file with explicit torch/torchvision deps and requirements
README_advanced.md Updated installation instructions for cu130
requirements.txt Restructured with --extra-index-url directive
tox.ini Updated to use cu130 index URL
update-runtime.cmd Windows runtime script updated to cu130
update-runtime.sh Linux/Mac runtime script updated to cu130

✨ Benefits

  1. Better GPU support: CUDA 13.1 provides improved compute capability for newer NVIDIA GPUs (including RTX 40-series and future hardware)
  2. Python 3.12 advantages: Performance improvements, better error messages, and access to latest language features
  3. Explicit dependencies: The new requirements.txt structure makes dependency resolution more reliable
  4. Cleaner installs: Removed specific torch version pin (torch==2.9.1) in favor of direct pip install with index URL for flexibility
  5. Updated SDK versions: Latest horde packages ensure compatibility and bug fixes

🧪 Testing Considerations

  • Build Docker images successfully on CUDA 13.1-compatible systems
  • Verify GPU detection within containers (nvidia-smi, torch.cuda.is_available())
  • Confirm worker registration and job processing works with new dependencies
  • Test existing custom workers/nodes to ensure compatibility with updated horde packages

⚠️ Notes for Reviewers

  • The shift from pinned (--==2.9.1) to unpinned PyTorch installation may affect reproducibility considerations - discuss if version pinning is preferred
  • Python 3.12 upgrade should be non-breaking but requires verification against any legacy dependencies
  • All cu130 URLs use the official PyTorch index: https://download.pytorch.org/whl/cu130
    updates across the horde ecosystem.

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