Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # Đặt biến môi trường cho cache (sử dụng HF_HOME thay vì TRANSFORMERS_CACHE) | |
| ENV HF_HOME=/tmp/.cache | |
| # Cài thư viện hệ thống cần thiết | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # Tạo thư mục làm việc | |
| WORKDIR /app | |
| # Copy code | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app.py . | |
| # Expose port mặc định HFS (7860) | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |