huy00001 commited on
Commit
696e02a
·
verified ·
1 Parent(s): e065bff

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -11
Dockerfile CHANGED
@@ -1,10 +1,8 @@
1
- # -------------------------
2
- # 1. Base image Python 3.10 slim
3
- # -------------------------
4
  FROM python:3.10-slim
5
 
6
  # -------------------------
7
- # 2. Cài thư viện hệ thống cần thiết
8
  # -------------------------
9
  RUN apt-get update && apt-get install -y \
10
  git \
@@ -19,33 +17,33 @@ RUN apt-get update && apt-get install -y \
19
  && git lfs install
20
 
21
  # -------------------------
22
- # 3. Thiết lập working directory
23
  # -------------------------
24
  WORKDIR /app
25
 
26
  # -------------------------
27
- # 4. Copy requirements.txt vào
28
  # -------------------------
29
  COPY requirements.txt .
30
 
31
  # -------------------------
32
- # 5. Upgrade pip và cài Python packages
33
  # -------------------------
34
  RUN pip install --no-cache-dir --upgrade pip
35
  RUN pip install --no-cache-dir -r requirements.txt
36
 
37
  # -------------------------
38
- # 6. Copy toàn bộ source code
39
  # -------------------------
40
  COPY . .
41
 
42
  # -------------------------
43
- # 7. Expose port mặc định HF Space
44
  # -------------------------
45
  EXPOSE 7860
46
 
47
  # -------------------------
48
- # 8. Chạy Flask app
49
- # HF Spaces yêu cầu chạy trên 0.0.0.0 và port $PORT
50
  # -------------------------
 
51
  CMD ["python", "app.py"]
 
1
+ # Base image Python 3.10 slim
 
 
2
  FROM python:3.10-slim
3
 
4
  # -------------------------
5
+ # 1. Cài thư viện hệ thống
6
  # -------------------------
7
  RUN apt-get update && apt-get install -y \
8
  git \
 
17
  && git lfs install
18
 
19
  # -------------------------
20
+ # 2. Thiết lập working directory
21
  # -------------------------
22
  WORKDIR /app
23
 
24
  # -------------------------
25
+ # 3. Copy requirements.txt vào
26
  # -------------------------
27
  COPY requirements.txt .
28
 
29
  # -------------------------
30
+ # 4. Upgrade pip và cài Python packages
31
  # -------------------------
32
  RUN pip install --no-cache-dir --upgrade pip
33
  RUN pip install --no-cache-dir -r requirements.txt
34
 
35
  # -------------------------
36
+ # 5. Copy toàn bộ source code
37
  # -------------------------
38
  COPY . .
39
 
40
  # -------------------------
41
+ # 6. Expose port mặc định HF Space
42
  # -------------------------
43
  EXPOSE 7860
44
 
45
  # -------------------------
46
+ # 7. Chạy Flask app
 
47
  # -------------------------
48
+ # HF Spaces yêu cầu chạy trên 0.0.0.0 và port $PORT
49
  CMD ["python", "app.py"]