Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +16 -16
Dockerfile
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
-
# Gunakan image Python yang ringan
|
| 2 |
-
FROM python:3.
|
| 3 |
-
|
| 4 |
-
# Set working directory
|
| 5 |
-
WORKDIR /code
|
| 6 |
-
|
| 7 |
-
# Copy file requirements
|
| 8 |
-
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
-
|
| 10 |
-
# Install dependencies
|
| 11 |
-
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
-
|
| 13 |
-
# Copy semua file ke dalam container
|
| 14 |
-
COPY . .
|
| 15 |
-
|
| 16 |
-
# Jalankan Uvicorn (FastAPI) pada port 7860 (port standar HF Spaces)
|
| 17 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
# Gunakan image Python yang ringan
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /code
|
| 6 |
+
|
| 7 |
+
# Copy file requirements
|
| 8 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
+
|
| 10 |
+
# Install dependencies
|
| 11 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
+
|
| 13 |
+
# Copy semua file ke dalam container
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
# Jalankan Uvicorn (FastAPI) pada port 7860 (port standar HF Spaces)
|
| 17 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|