imbecome commited on
Commit
aefa85f
·
verified ·
1 Parent(s): f529a5c

apply docker

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Gunakan image python yang ringan
2
+ FROM python:3.10-slim
3
+
4
+ # Install dependensi sistem (ffmpeg wajib untuk whisper)
5
+ RUN apt-get update && apt-get install -y \
6
+ curl \
7
+ ffmpeg \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Buat user baru dengan UID 1000 (aturan wajib Hugging Face)
11
+ RUN useradd -m -u 1000 user
12
+ USER user
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH
15
+
16
+ # Tentukan folder kerja
17
+ WORKDIR $HOME/app
18
+
19
+ # Install library python
20
+ COPY --chown=user requirements.txt .
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Salin kode aplikasi
24
+ COPY --chown=user . .
25
+
26
+ # Port default untuk Hugging Face Spaces
27
+ EXPOSE 7860
28
+
29
+ # Jalankan server
30
+ CMD ["python", "app.py"]