File size: 1,222 Bytes
450d656
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# ベースイメージを指定(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"]