trangluc commited on
Commit
c4f838c
·
verified ·
1 Parent(s): 619aa83

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -21
Dockerfile CHANGED
@@ -1,28 +1,13 @@
1
- # Base image
2
  FROM python:3.12-slim
3
-
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Cài unzip
8
- RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
9
-
10
- # Copy file zip vào container (file phải cùng thư mục với Dockerfile)
11
- COPY Top_cv.zip .
12
-
13
- # Giải nén vào thư mục hiện tại
14
- RUN unzip Top_cv.zip -d ./ && rm Top_cv.zip
15
-
16
- # Copy requirements nếu chưa có trong zip, hoặc dùng requirements trong zip
17
- # RUN pip install --no-cache-dir -r requirements.txt
18
-
19
- # Cài dependencies (nếu có requirements.txt trong zip)
20
  RUN pip install --no-cache-dir --upgrade pip
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
- # Expose port cho FastAPI
24
- EXPOSE 7860
25
-
26
- # Chạy FastAPI
27
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
28
 
 
 
 
 
1
  FROM python:3.12-slim
 
 
2
  WORKDIR /app
3
 
4
+ # Cài dependencies
5
+ COPY requirements.txt .
 
 
 
 
 
 
 
 
 
 
 
6
  RUN pip install --no-cache-dir --upgrade pip
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
+ # Copy toàn bộ code
10
+ COPY . .
 
 
 
11
 
12
+ EXPOSE 7860
13
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]