File size: 486 Bytes
183c8ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Gunakan Python versi 3.10
FROM python:3.10

# Atur folder kerja di dalam server
WORKDIR /code

# Salin file requirements dan install library
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Salin semua file model dan kodemu ke dalam server
COPY . .

# Beri tahu server untuk menjalankan FastAPI di port 7860 (Syarat wajib Hugging Face)
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]