Lyon28 commited on
Commit
f663e69
·
verified ·
1 Parent(s): edde1d1

Update requirements.txt

Browse files
Files changed (1) hide show
  1. requirements.txt +16 -6
requirements.txt CHANGED
@@ -1,6 +1,16 @@
1
- fastapi
2
- uvicorn
3
- transformers
4
- torch
5
- sentencepiece
6
- accelerate
 
 
 
 
 
 
 
 
 
 
 
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"]