Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +10 -9
Dockerfile
CHANGED
|
@@ -1,17 +1,18 @@
|
|
| 1 |
-
# Gunakan image Python
|
| 2 |
-
FROM python:3.9
|
| 3 |
|
| 4 |
-
#
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
COPY . /
|
|
|
|
| 9 |
|
| 10 |
# Install dependencies
|
| 11 |
-
RUN pip install -r requirements.txt
|
| 12 |
|
| 13 |
-
# Expose port
|
| 14 |
EXPOSE 7860
|
| 15 |
|
| 16 |
-
# Jalankan
|
| 17 |
-
CMD ["
|
|
|
|
| 1 |
+
# Gunakan base image Python yang ringan
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Tentukan working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy file yang diperlukan
|
| 8 |
+
COPY requirements.txt ./
|
| 9 |
+
COPY launcher.py ./
|
| 10 |
|
| 11 |
# Install dependencies
|
| 12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
+
# Expose port FastAPI (Hugging Face menggunakan port 7860 secara default)
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
+
# Jalankan launcher.py untuk mengunduh dan menjalankan app.py
|
| 18 |
+
CMD ["python", "launcher.py"]
|