Skip to content

Commit

Permalink
feat: provide option to run the handler locally as API
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Feb 11, 2024
1 parent 1789028 commit 69848e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ version: "3.8"

services:
comfyui:
image: timpietruskyblibla/runpod-worker-comfy:1.0.0
image: timpietruskyblibla/runpod-worker-comfy:latest
container_name: comfyui-worker
environment:
- NVIDIA_VISIBLE_DEVICES=all
env_file:
- .env
- SERVE_API_LOCALLY=true
ports:
- "8000:8000"
runtime: nvidia
volumes:
- ./data/comfyui/output:/comfyui/output
8 changes: 7 additions & 1 deletion src/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ echo "runpod-worker-comfy: Starting ComfyUI"
python3 /comfyui/main.py --disable-auto-launch --disable-metadata &

echo "runpod-worker-comfy: Starting RunPod Handler"
python3 -u /rp_handler.py

# Serve the API and don't shutdown the container
if [ "$SERVE_API_LOCALLY" == "true" ]; then
python3 -u /rp_handler.py --rp_serve_api
else
python3 -u /rp_handler.py
fi

0 comments on commit 69848e5

Please sign in to comment.