092_agent_api / Dockerfile
anhkhoiphan's picture
Sửa api_requirements
71f6ce8
raw
history blame contribute delete
454 Bytes
FROM python:3.11-slim
WORKDIR /app
# Cache dependency layer riêng
COPY api_requirements.txt .
RUN pip install --no-cache-dir -r api_requirements.txt
# Copy toàn bộ src/ vào /app/src/ để giữ nguyên "from src.xxx" import paths
COPY . ./src/
# Thư mục fallback khi Redis không kết nối được
RUN mkdir -p /app/data
# HF Spaces yêu cầu port 7860
EXPOSE 7860
CMD ["uvicorn", "src.api:app", "--host", "0.0.0.0", "--port", "7860"]