LCORE-569: Fix installing cpu version of pytorch, drop LD_LIBRARY_PATH for gpu image#34
Conversation
WalkthroughRemoved CUDA compat path from LD_LIBRARY_PATH in Containerfile-gpu and switched the uv source alias in pyproject.toml from "torchvision" to "torch" pointing to the same pytorch-cpu index. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
pyproject.toml (2)
61-61: Future-proof: map torchvision/torchaudio to the same CPU index (if added later)If you later introduce torchvision or torchaudio, consider mapping them to the same CPU index to avoid accidental CUDA variants or resolution surprises.
Apply this change to expand the sources block:
[tool.uv.sources] -torch = [{ index = "pytorch-cpu" }] +torch = [{ index = "pytorch-cpu" }] +torchvision = [{ index = "pytorch-cpu" }] +torchaudio = [{ index = "pytorch-cpu" }]
35-50: Minor consistency nit: unify huggingface package name styleYou have both “huggingface_hub” (deps) and “huggingface-hub” (dev). They resolve to the same package, but mixing styles can confuse tooling and readers. Consider normalizing to the canonical PyPI name (“huggingface-hub”) across groups in a follow-up.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
Containerfile-gpu(0 hunks)pyproject.toml(1 hunks)
💤 Files with no reviewable changes (1)
- Containerfile-gpu
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Pylinter
- GitHub Check: build-and-push-dev
- GitHub Check: mypy
🔇 Additional comments (2)
pyproject.toml (2)
61-61: Correct direction: mapping torch to the CPU index is the right fixPointing torch to the pytorch-cpu index aligns with the PR goal and should force CPU wheels when resolving with uv (given the explicit=true index). Nice.
61-61: torch==2.7.1 CPU wheel for Python 3.12 (cp312) is available — no change requiredI verified the PyTorch CPU index and found Linux cp312 manylinux wheels for torch 2.7.1 (e.g. torch-2.7.1+cpu-cp312-cp312-manylinux_2_28_x86_64.whl).
- File: pyproject.toml (around line 61)
- Current entry: torch = [{ index = "pytorch-cpu" }]
Snippet:
torch = [{ index = "pytorch-cpu" }]
tisnik
left a comment
There was a problem hiding this comment.
Seems ok (dunno about those resolution markers for Darwin, but whatever ;)
Description
LCORE-569: Fix installing cpu version of pytorch, drop LD_LIBRARY_PATH for gpu image
Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit