Spaces:
Starting
Starting
Update requirements.txt
Browse files- requirements.txt +16 -6
requirements.txt
CHANGED
@@ -1,6 +1,16 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Gunakan image Python resmi
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Set direktori kerja
|
5 |
+
WORKDIR /code
|
6 |
+
|
7 |
+
# Salin file requirements dan install
|
8 |
+
COPY ./requirements.txt /code/requirements.txt
|
9 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
10 |
+
|
11 |
+
# Salin semua kode aplikasi kita ke dalam direktori kerja
|
12 |
+
COPY ./app /code/app
|
13 |
+
|
14 |
+
# Perintahkan server untuk menjalankan API kita menggunakan uvicorn
|
15 |
+
# Port 7860 adalah port standar untuk Hugging Face Spaces
|
16 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|