feat: add virtual environment support for Python services

- Update supervisord.conf to use venv Python executables for orchestrator and webdav-sync
- Add virtual environment setup to arty.yml setup/python-env script
- Isolate dependencies for webdav-sync, model-orchestrator, and vllm services
- Fixes dependency conflicts between services (pydantic versions)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-23 06:13:17 +01:00
parent 68485e00b9
commit 664ed04cd9
2 changed files with 22 additions and 7 deletions

View File

@@ -188,16 +188,31 @@ scripts:
echo "⚠ Warning: $AI_ROOT/core/requirements.txt not found"
fi
# Install vLLM dependencies
echo "Installing vLLM dependencies..."
# Create virtual environments for services with isolated dependencies
echo ""
echo "Creating virtual environments for services..."
# WebDAV sync service
if [ -f "webdav-sync/requirements.txt" ]; then
echo " - webdav-sync..."
cd webdav-sync && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt && deactivate && cd ..
fi
# Model orchestrator service
if [ -f "model-orchestrator/requirements.txt" ]; then
echo " - model-orchestrator..."
cd model-orchestrator && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt && deactivate && cd ..
fi
# vLLM service (may require more memory)
if [ -f "vllm/requirements.txt" ]; then
sudo pip3 install -r vllm/requirements.txt
else
echo "⚠ Warning: vllm/requirements.txt not found"
echo " - vllm (this may take a while)..."
cd vllm && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt && deactivate && cd ..
fi
echo ""
echo "✓ Python environment configured successfully"
echo " Virtual environments created for: webdav-sync, model-orchestrator, vllm"
setup/comfyui-base: |
echo "========================================="

View File

@@ -41,7 +41,7 @@ stopwaitsecs=30
# AI Model Orchestrator
[program:orchestrator]
command=python3 model-orchestrator/orchestrator_subprocess.py
command=model-orchestrator/venv/bin/python model-orchestrator/orchestrator_subprocess.py
directory=.
autostart=false
autorestart=true
@@ -58,7 +58,7 @@ stopwaitsecs=30
# ComfyUI WebDAV Sync Service
[program:webdav-sync]
command=python3 webdav_sync.py
command=webdav-sync/venv/bin/python webdav_sync.py
directory=webdav-sync
autostart=true
autorestart=true