harmosplit / Dockerfile
indigo0511
initial: HarmoSplit app
d90b8a8
raw
history blame contribute delete
876 Bytes
# HarmoSplit — HuggingFace Spaces 用 Dockerfile
# ポート 7860 を使用(HF Spaces 必須)
FROM python:3.11-slim
# システム依存関係
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# PyTorch CPU 版を先にインストール(キャッシュ効率化)
RUN pip install --no-cache-dir \
torch==2.2.2 torchaudio==2.2.2 \
--index-url https://download.pytorch.org/whl/cpu
# その他依存関係
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# アプリケーションコード
COPY . .
# 永続ストレージ用ディレクトリ(HF Spaces の /data にマウントされる)
RUN mkdir -p /data
# HuggingFace Spaces は 7860 番ポートを公開する
EXPOSE 7860
# 起動
CMD ["python", "server.py"]