zetarmany commited on
Commit
f7ed690
·
verified ·
1 Parent(s): fdd0871

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -13
Dockerfile CHANGED
@@ -1,31 +1,21 @@
1
- # Dockerfile
2
  FROM python:3.9-slim
3
 
4
  WORKDIR /app
5
 
6
- # Install system dependencies - PASTIKAN MENGGUNAKAN NAMA PACKAGE YANG BENAR
7
  RUN apt-get update && apt-get install -y \
8
  gcc \
9
  libgl1 \
10
  libglib2.0-0 \
11
- libsm6 \
12
- libxext6 \
13
- libxrender1 \
14
- libgomp1 \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Copy requirements
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
- # Copy semua file aplikasi
22
  COPY . .
23
 
24
- # Buat folder upload dengan permission yang benar
25
- RUN mkdir -p static/uploads && chmod -R 777 static
26
 
27
- # Expose port untuk Hugging Face
28
  EXPOSE 7860
29
 
30
- # Jalankan aplikasi dengan gunicorn
31
- CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--timeout", "120", "--workers", "2"]
 
 
1
  FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  gcc \
7
  libgl1 \
8
  libglib2.0-0 \
 
 
 
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
 
14
  COPY . .
15
 
16
+ RUN mkdir -p static/uploads
 
17
 
 
18
  EXPOSE 7860
19
 
20
+ # Pakai 1 worker aja biar aman
21
+ CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "120"]