Spaces:
Build error
Build error
Create Dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Gunakan image dasar dari Automatic1111
|
| 2 |
+
FROM ghcr.io/ashleykleynhans/sd-auto1111-docker:latest
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Unduh model dari CivitAI
|
| 8 |
+
RUN wget -O /app/models/Stable-diffusion/model.safetensors "https://civitai.com/api/download/models/1490781?type=Model&format=SafeTensor&size=pruned&fp=fp16"
|
| 9 |
+
|
| 10 |
+
# Install FastAPI dan Uvicorn
|
| 11 |
+
RUN pip install fastapi uvicorn
|
| 12 |
+
|
| 13 |
+
# Salin file API ke dalam container
|
| 14 |
+
COPY api.py /app/api.py
|
| 15 |
+
|
| 16 |
+
# Jalankan API
|
| 17 |
+
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
|