Flux.2-dev-API-URL / Dockerfile
Bl4ckSpaces's picture
Create Dockerfile
add1da6 verified
raw
history blame contribute delete
469 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY . .
# Buat folder cache gradio biar gak error permission
RUN mkdir -p /.gradio && chmod 777 /.gradio
ENV GRADIO_TEMP_DIR="/.gradio"
# Port HF Spaces
EXPOSE 7860
# Jalankan Gunicorn: 4 Workers untuk handle request paralel
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "--workers", "4", "--timeout", "120"]