maitrang04 commited on
Commit
fb4379c
·
verified ·
1 Parent(s): c263b88

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -1,17 +1,20 @@
 
1
  FROM python:3.11-slim
2
 
 
3
  WORKDIR /app
4
 
5
- # Copy code
6
  COPY backend ./backend
7
  COPY frontend ./frontend
8
  COPY requirements.txt ./requirements.txt
9
 
10
- # Install dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
 
12
 
13
  # Hugging Face yêu cầu app lắng nghe ở 0.0.0.0
14
  EXPOSE 7860
15
 
16
- # Start FastAPI
17
  CMD ["uvicorn", "backend.ai.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Sử dụng Python slim nhẹ
2
  FROM python:3.11-slim
3
 
4
+ # Thiết lập working directory
5
  WORKDIR /app
6
 
7
+ # Copy toàn bộ code
8
  COPY backend ./backend
9
  COPY frontend ./frontend
10
  COPY requirements.txt ./requirements.txt
11
 
12
+ # Cập nhật pip và cài dependencies
13
+ RUN pip install --upgrade pip \
14
+ && pip install --no-cache-dir -r requirements.txt
15
 
16
  # Hugging Face yêu cầu app lắng nghe ở 0.0.0.0
17
  EXPOSE 7860
18
 
19
+ # Start FastAPI app
20
  CMD ["uvicorn", "backend.ai.main:app", "--host", "0.0.0.0", "--port", "7860"]