Spaces:
Sleeping
Sleeping
| # Sử dụng image Hugging Face có GPU, Python, Torch, Transformers sẵn | |
| FROM huggingface/transformers-pytorch-gpu | |
| # Cài các thư viện hệ thống cần thiết | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg libsm6 libxext6 libgl1-mesa-glx git curl && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Copy file yêu cầu Python | |
| COPY requirements.txt . | |
| # Cài thư viện Python | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| # Copy code chính | |
| COPY app.py . | |
| # Mở cổng FastAPI | |
| EXPOSE 7860 | |
| # Chạy ứng dụng FastAPI | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |