Ochank commited on
Commit
0699a7c
·
verified ·
1 Parent(s): 569d4a7

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Gunakan Python versi 3.9
2
+ FROM python:3.9
3
+
4
+ # Buat folder kerja
5
+ WORKDIR /code
6
+
7
+ # Beri izin folder cache untuk AI (Penting di Hugging Face!)
8
+ RUN mkdir -p /.u2net && chmod 777 /.u2net
9
+
10
+ # Salin daftar belanja & install
11
+ COPY ./requirements.txt /code/requirements.txt
12
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
+
14
+ # Salin kode program
15
+ COPY . .
16
+
17
+ # Jalankan API di port 7860 (Port wajib Hugging Face)
18
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]