File size: 1,377 Bytes
4efb182
 
 
 
87b6aef
 
 
 
 
 
 
 
f93ea45
87b6aef
 
 
 
 
 
 
f93ea45
 
 
87b6aef
 
 
f93ea45
 
 
87b6aef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Dockerfile for local development only
# NOTE: Hugging Face Spaces uses Gradio SDK (not Docker) for ZeroGPU support
# This Dockerfile is provided for local testing and development purposes

FROM nvidia/cuda:12.4.0-cudnn-devel-ubuntu22.04

# 環境変数
ENV DEBIAN_FRONTEND=noninteractive \
    PYTHONUNBUFFERED=1 \
    GRADIO_SERVER_NAME=0.0.0.0 \
    GRADIO_SERVER_PORT=7860

# システムパッケージの更新とPython 3.13のインストール
RUN apt-get update && apt-get install -y \
    software-properties-common \
    wget \
    git \
    && add-apt-repository ppa:deadsnakes/ppa \
    && apt-get update \
    && apt-get install -y \
    python3.13 \
    python3.13-dev \
    python3.13-venv \
    python3-pip \
    && rm -rf /var/lib/apt/lists/*

# Python 3.13をデフォルトに設定
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 1 \
    && update-alternatives --install /usr/bin/python python /usr/bin/python3.13 1

# pipのアップグレード
RUN python3 -m pip install --upgrade pip setuptools wheel

# 作業ディレクトリ
WORKDIR /app

# 依存関係をコピーしてインストール
COPY requirements.txt .
RUN python3 -m pip install --no-cache-dir -r requirements.txt

# アプリケーションファイルをコピー
COPY . .

# ポート公開
EXPOSE 7860

# 起動コマンド
CMD ["python3", "app.py"]