mjamalm18 commited on
Commit
5a2a2cb
·
verified ·
1 Parent(s): 5ea0bb6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -12
Dockerfile CHANGED
@@ -1,12 +1,18 @@
1
- FROM python:3.10-slim
2
-
3
- # Install dependencies
4
- COPY requirements.txt .
5
- RUN pip install --no-cache-dir -r requirements.txt
6
-
7
- # Copy source code
8
- COPY . /app
9
- WORKDIR /app
10
-
11
- # Jalankan uvicorn di port 7860 (port wajib HF Spaces)
12
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Install sistem dependencies jika perlu (opsional untuk HF Spaces)
4
+ RUN apt-get update && apt-get install -y \
5
+ git \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Install Python dependencies
9
+ COPY requirements.txt .
10
+ RUN pip install --no-cache-dir --upgrade pip
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Salin semua source code + data ke container
14
+ COPY . /app
15
+ WORKDIR /app
16
+
17
+ # Jalankan uvicorn di port 7860 (wajib untuk Hugging Face Spaces)
18
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]