-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
33 lines (27 loc) · 1.27 KB
/
start.sh
File metadata and controls
33 lines (27 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
# Check if /runpod-volume exists
if [ -d "/runpod-volume" ]; then
echo "Symlinking files from Network Volume"
rm -rf /workspace && ln -s /runpod-volume /workspace
source /workspace/venv/bin/activate
echo "venv info:"
echo $VIRTUAL_ENV && python -V && which python && which pip
# Use libtcmalloc for better memory management
TCMALLOC="$(ldconfig -p | grep -Po "libtcmalloc.so.\d" | head -n 1)"
export LD_PRELOAD="${TCMALLOC}"
export PYTHONUNBUFFERED=true
export HF_HOME="/workspace"
cd /workspace/comfywan
# Ensure ComfyUI-Manager runs in offline network mode inside the container
comfy-manager-set-mode offline || echo "worker-comfyui - Could not set ComfyUI-Manager network_mode" >&2
echo "worker-comfyui: Starting ComfyUI"
# Allow operators to tweak verbosity; default is INFO.
: "${COMFY_LOG_LEVEL:=INFO}"
# ✅ CORRECTION: Port 8188 au lieu de 3000 pour compatibilité avec rp_handler.py
python -u /workspace/comfywan/main.py --port 8188 --use-sage-attention --base-directory /workspace/comfywan --disable-auto-launch --disable-metadata --verbose "${COMFY_LOG_LEVEL}" --log-stdout &
echo "worker-comfyui: Starting RunPod Handler"
python -u /rp_handler.py
else
echo "Warning: /runpod-volume does not exist"
exit 1
fi