Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -13
Dockerfile
CHANGED
|
@@ -2,27 +2,25 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && \
|
| 6 |
-
apt-get install -y git wget
|
| 7 |
rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
-
# Clone ComfyUI
|
| 10 |
RUN git clone https://github.com/comfyanonymous/ComfyUI.git /app/ComfyUI
|
| 11 |
|
| 12 |
-
#
|
| 13 |
COPY requirements.txt .
|
| 14 |
-
COPY download_models.py .
|
| 15 |
-
COPY app.py .
|
| 16 |
-
COPY workflow_api.json .
|
| 17 |
-
|
| 18 |
-
# Install Python deps
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
-
#
|
|
|
|
| 22 |
RUN python download_models.py
|
| 23 |
|
| 24 |
-
#
|
| 25 |
-
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
-
CMD
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies
|
| 6 |
RUN apt-get update && \
|
| 7 |
+
apt-get install -y git wget && \
|
| 8 |
rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
+
# Clone ComfyUI into /app/ComfyUI
|
| 11 |
RUN git clone https://github.com/comfyanonymous/ComfyUI.git /app/ComfyUI
|
| 12 |
|
| 13 |
+
# Copy requirements and install Python packages
|
| 14 |
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
+
# Download models into ComfyUI structure
|
| 18 |
+
COPY download_models.py .
|
| 19 |
RUN python download_models.py
|
| 20 |
|
| 21 |
+
# Copy app code and workflow
|
| 22 |
+
COPY app.py .
|
| 23 |
+
COPY workflow_api.json .
|
| 24 |
|
| 25 |
+
EXPOSE 7860
|
| 26 |
+
CMD ["python", "app.py"]
|