Spaces:
Running
Running
File size: 1,747 Bytes
75d01a9 f7f387b 75d01a9 71f26d4 ffc8709 75d01a9 97be6e8 75d01a9 | 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | # ベースイメージ
FROM python:3.13
# 作業ディレクトリ
WORKDIR /app
# 必要パッケージのインストール
RUN apt-get update && \
apt-get install -y \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
cmake \
rsync \
libgl1 \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# Node.js のインストール
RUN apt-get update && \
apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
COPY . .
RUN npm install packager@git+https://github.com/izum00/turbowarp-packager.git
# pip のアップグレードと必要ライブラリのインストール
RUN pip install --no-cache-dir pip -U && \
pip install --no-cache-dir \
datasets \
"huggingface-hub>=0.30" \
"hf-transfer>=0.1.4" \
"protobuf<4" \
"click<8.1"
# requirements.txt に基づく Python パッケージのインストール
# gradio、uvicorn、websockets、spaces も追加
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt \
pip install --no-cache-dir -r /tmp/requirements.txt \
gradio[oauth,mcp]==6.5.1 \
"uvicorn>=0.14.0" \
"websockets>=10.4" \
spaces
# ユーザ用ディレクトリ作成とシンボリックリンク
RUN mkdir -p /home/user && \
( [ -e /home/user/app ] || ln -s /app/ /home/user/app ) || true
# 現在のディレクトリをコンテナ内 /app にコピー
COPY ./ /app
# pip freeze 保存用
RUN mkdir -p /pipfreeze && pip freeze > /pipfreeze/freeze.txt
# コンテナ起動時に app.py を実行
CMD ["python", "app.py"] |