Bl4ckSpaces commited on
Commit
add1da6
·
verified ·
1 Parent(s): cd2942e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install dependencies
6
+ COPY requirements.txt .
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ # Copy app code
10
+ COPY . .
11
+
12
+ # Buat folder cache gradio biar gak error permission
13
+ RUN mkdir -p /.gradio && chmod 777 /.gradio
14
+ ENV GRADIO_TEMP_DIR="/.gradio"
15
+
16
+ # Port HF Spaces
17
+ EXPOSE 7860
18
+
19
+ # Jalankan Gunicorn: 4 Workers untuk handle request paralel
20
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "--workers", "4", "--timeout", "120"]