Spaces:
Runtime error
Runtime error
| # ベースイメージを指定(Python 3.10 使用例) | |
| FROM python:3.10-slim | |
| # 作業ディレクトリを設定 | |
| WORKDIR /app | |
| # 必要なシステム依存関係をインストール(最小限) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libsm6 \ | |
| libxext6 \ | |
| libgl1-mesa-glx \ | |
| git \ | |
| curl \ | |
| gnupg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Git LFS の公式スクリプトを実行してインストール | |
| RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \ | |
| && apt-get install -y git-lfs | |
| # Git LFS を初期化 | |
| RUN git lfs install | |
| # Pythonの依存関係インストール用のキャッシュを有効活用 | |
| COPY requirements.txt . | |
| # ディレクトリの初期化とリポジトリのクローン | |
| RUN rm -rf /weights/* && \ | |
| git clone https://huggingface.co/datasets/soiz1/rvc-models /weights | |
| # クローン後の確認 | |
| RUN ls -l /weights | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # アプリケーションファイルをコンテナにコピー | |
| COPY . . | |
| # アプリのエントリポイントを設定 | |
| CMD ["python", "app.py"] |