Fix aria2 path handling for local (non-Docker) installations#2999
Fix aria2 path handling for local (non-Docker) installations#2999ViolinKaine wants to merge 2 commits into
Conversation
The previous logic stripped the ComfyUI base path prefix and sent a root-relative path (e.g. /custom_nodes) to aria2 via RPC, causing a permission error when aria2 tried to create that directory at the filesystem root. Use the full absolute path when model_dir is absolute; fall back to /models/<dir> only for relative paths (Docker-style setups). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesDocker-Aware aria2 Download Path Resolution
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@glob/manager_downloader.py`:
- Around line 83-86: The conditional logic checking os.path.isabs(model_dir)
does not account for Docker environments where aria2 containers have restricted
path visibility. Add Docker environment detection (via environment variable or
config flag) before the isabs check. When running in Docker, remap absolute
paths from get_model_dir() back to container-relative paths (like /models/... or
/custom_nodes/...) so aria2 can access them properly. When not in Docker, keep
the current absolute path handling. This ensures download_dir is set to the
correct accessible path for both local and containerized installations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2ccfba9c-316d-422a-a6b0-d4845317652c
📒 Files selected for processing (1)
glob/manager_downloader.py
…ping In Docker, aria2 runs in a separate container with only mounted paths visible (e.g. /models, /custom_nodes), not host absolute paths. Detect Docker via /.dockerenv or COMFYUI_ARIA2_CONTAINER_PATHS=true env var and remap to container-relative paths in that case. On bare-metal, use the full absolute path so aria2 can locate the directory. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The previous logic stripped the ComfyUI base path prefix and sent a root-relative path (e.g. /custom_nodes) to aria2 via RPC, causing a permission error when aria2 tried to create that directory at the filesystem root.
Use the full absolute path when model_dir is absolute; fall back to /models/"directory" only for relative paths (Docker-style setups).
Aria2 RPC was receiving /custom_nodes instead of the full path, causing permission denied on non-Docker (local venv's) installs.