BioVibe_v2 / Dockerfile
Hezu06's picture
refactor Dockerfile by removing FluidSynth installation and updating model and data file references
9585181
Raw History Blame Contribute Delete
681 Bytes
# 1. Chọn hệ điều hành gốc là Linux với Python 3.10
FROM python:3.10-slim
# 3. Tạo không gian làm việc
WORKDIR /app
# 4. Copy file danh sách thư viện và cài đặt
COPY requirements.txt .
# Cài đặt PyTorch bản CPU để tiết kiệm dung lượng và tránh lỗi
RUN pip install --no-cache-dir -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
# 5. Bê toàn bộ code của bạn bỏ vào container
COPY . .
# 6. Mở cửa số 7860 (Hugging Face bắt buộc dùng port này)
EXPOSE 7860
# 7. Ra lệnh bật server FastAPI khi hệ thống chạy
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]