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. Chn hệ điu hành gc là Linux vi Python 3.10
FROM python:3.10-slim
# 3. To không gian làm vic
WORKDIR /app
# 4. Copy file danh sách thư vin và cài đặt
COPY requirements.txt .
# Cài đặt PyTorch bn CPU để tiết kim dung lượng và tránh li
RUN pip install --no-cache-dir -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
# 5. Bê toàn bcode ca bn bvào container
COPY . .
# 6. Mca s7860 (Hugging Face bắt buộc dùng port này)
EXPOSE 7860
# 7. Ra lnh bt server FastAPI khi hthng chy
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]