tri86uit commited on
Commit
ea89a29
·
verified ·
1 Parent(s): 5a34558

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sử dụng Python 3.10 (Phiên bản ổn định cho code cũ)
2
+ FROM python:3.10-slim
3
+
4
+ # Cài đặt các công cụ hệ thống cần thiết
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ git-lfs \
8
+ ffmpeg \
9
+ libsm6 \
10
+ libxext6 \
11
+ cmake \
12
+ rsync \
13
+ libgl1 \
14
+ && rm -rf /var/lib/apt/lists/* \
15
+ && git lfs install
16
+
17
+ # Thiết lập thư mục làm việc
18
+ WORKDIR /app
19
+
20
+ # Copy file requirements và cài đặt thư viện
21
+ COPY requirements.txt .
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy toàn bộ code vào Space
25
+ COPY . .
26
+
27
+ # Cấp quyền truy cập (fix lỗi permission trên HF Spaces)
28
+ RUN chmod -R 777 /app
29
+
30
+ # Chạy ứng dụng
31
+ CMD ["python", "app.py"]