mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Merge pull request #1 from zhangpeihaoks/feat-docker
feat: add support for docker deploy
This commit is contained in:
commit
de20f65a35
27
.dockerignore
Normal file
27
.dockerignore
Normal file
@ -0,0 +1,27 @@
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
/output/
|
||||
/input/
|
||||
!/input/example.png
|
||||
/models/
|
||||
/temp/
|
||||
/custom_nodes/
|
||||
!custom_nodes/example_node.py.example
|
||||
extra_model_paths.yaml
|
||||
/.vs
|
||||
.vscode/
|
||||
.idea/
|
||||
venv/
|
||||
.venv/
|
||||
/web/extensions/*
|
||||
!/web/extensions/logging.js.example
|
||||
!/web/extensions/core/
|
||||
/tests-ui/data/object_info.json
|
||||
/user/
|
||||
*.log
|
||||
web_custom_versions/
|
||||
.DS_Store
|
||||
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
*.whl
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM python:3.12-slim
|
||||
WORKDIR /app
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
PIP_NO_CACHE_DIR=on
|
||||
RUN --mount=type=cache,target=/var/cache/apt \
|
||||
apt-get update && \
|
||||
apt-get install git -y && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip install torch==2.3.1 torchvision==0.18.1 torchaudio --extra-index-url https://download.pytorch.org/whl/cu124 \
|
||||
&& pip install -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["python3", "main.py"]
|
12
docker-compose.yaml
Normal file
12
docker-compose.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
services:
|
||||
comfyui:
|
||||
build: .
|
||||
ports:
|
||||
- "8188:8188"
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: "nvidia"
|
||||
count: "all"
|
||||
capabilities: ["gpu"]
|
@ -1,4 +1,4 @@
|
||||
torch
|
||||
torch==2.3.1
|
||||
torchsde
|
||||
torchvision
|
||||
torchaudio
|
||||
|
Loading…
Reference in New Issue
Block a user