File size: 469 Bytes
add1da6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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"]