File size: 529 Bytes
6d1b6e2
f6dd293
6d1b6e2
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Gunakan image dasar dari Automatic1111
FROM ghcr.io/ashleykleynhans/stable-diffusion-docker:latest
# Set working directory
WORKDIR /app

# Unduh model dari CivitAI
RUN wget -O /app/models/Stable-diffusion/model.safetensors "https://civitai.com/api/download/models/1490781?type=Model&format=SafeTensor&size=pruned&fp=fp16"

# Install FastAPI dan Uvicorn
RUN pip install fastapi uvicorn

# Salin file API ke dalam container
COPY api.py /app/api.py

# Jalankan API
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]