andrymamboro commited on
Commit
e5c5ade
·
verified ·
1 Parent(s): 0d1ce6a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Gunakan image Python ringan
2
+ FROM python:3.10-slim
3
+
4
+ WORKDIR /app
5
+
6
+ # Install dependensi sistem untuk pengolahan gambar
7
+ RUN apt-get update && apt-get install -y \
8
+ build-essential \
9
+ libopenblas-dev \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Install library Python
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Salin kode server (Ingat: JANGAN masukkan optimization.py)
17
+ COPY . .
18
+
19
+ # Port standar untuk Hugging Face Spaces
20
+ EXPOSE 7860
21
+
22
+ # Jalankan server
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]