File size: 509 Bytes
fb4379c
4df4343
 
fb4379c
4df4343
 
fb4379c
d53adb7
4df4343
d53adb7
4df4343
fb4379c
 
 
4df4343
d53adb7
 
4df4343
fb4379c
d53adb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Sử dụng Python slim nhẹ
FROM python:3.11-slim

# Thiết lập working directory
WORKDIR /app

# Copy toàn bộ code
COPY backend ./backend
COPY frontend ./frontend
COPY requirements.txt ./requirements.txt

# Cập nhật pip và cài dependencies
RUN pip install --upgrade pip \
    && pip install --no-cache-dir -r requirements.txt

# Hugging Face yêu cầu app lắng nghe ở 0.0.0.0
EXPOSE 7860

# Start FastAPI app
CMD ["uvicorn", "backend.ai.main:app", "--host", "0.0.0.0", "--port", "7860"]