vanfun_be / Dockerfile
moonbaek's picture
Upload Dockerfile
8992cc5 verified
Raw
History Blame Contribute Delete
610 Bytes
FROM python:3.10-slim
WORKDIR /code
# Cài đặt các thư viện hệ thống cần thiết (nếu có)
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Copy file danh sách thư viện vào trước để cache
COPY ./requirements.txt /code/requirements.txt
# Cài đặt các thư viện Python
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy toàn bộ code backend vào trong container
COPY . .
# BẮT BUỘC CHẠY TRÊN PORT 7860 (Hugging Face quy định)
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]