ai / Dockerfile
Test1hdhs718's picture
Update
3ea44b2
raw
history blame contribute delete
No virus
551 Bytes
# Sử dụng Python 3.9
FROM python:3.9-slim
# Thiết lập thư mục làm việc
WORKDIR /app
# Sao chép file requirements.txt vào thư mục làm việc
COPY requirements.txt .
# Cài đặt các dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Sao chép toàn bộ mã nguồn vào thư mục làm việc
COPY . .
# Mở cổng 7860, nơi FastAPI sẽ chạy
EXPOSE 7860
# Khởi chạy ứng dụng bằng uvicorn khi container được khởi động
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]