mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-14 15:32:35 +08:00
Add Dockerfile for Cloud Run deployment
This commit is contained in:
parent
3bea4efc6b
commit
64ff3688a9
19
.dockerignore
Normal file
19
.dockerignore
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
.git
|
||||||
|
.github
|
||||||
|
__pycache__
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
*.pyd
|
||||||
|
.Python
|
||||||
|
*.so
|
||||||
|
*.egg
|
||||||
|
*.egg-info
|
||||||
|
dist
|
||||||
|
build
|
||||||
|
.vscode
|
||||||
|
.idea
|
||||||
|
*.md
|
||||||
|
output
|
||||||
|
input
|
||||||
|
models/checkpoints/*.safetensors
|
||||||
|
models/checkpoints/*.ckpt
|
||||||
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
FROM python:3.13-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Sistem bağımlılıkları
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
git \
|
||||||
|
wget \
|
||||||
|
libgl1 \
|
||||||
|
libglib2.0-0 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Tüm dosyaları kopyala
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
# PyTorch CPU versiyonu ve bağımlılıklar
|
||||||
|
RUN pip install --no-cache-dir \
|
||||||
|
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
|
||||||
|
pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Cloud Run PORT environment variable'ını kullan
|
||||||
|
ENV PORT=8188
|
||||||
|
EXPOSE 8188
|
||||||
|
|
||||||
|
# Başlat
|
||||||
|
CMD python main.py --listen 0.0.0.0 --port ${PORT}
|
||||||
Loading…
Reference in New Issue
Block a user