| FROM python:3.11-slim | |
| WORKDIR /app | |
| # システム依存パッケージ | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| g++ \ | |
| git \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxrender1 \ | |
| libxext6 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # requirements をコピーしてインストール | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Gradio 本体 | |
| RUN pip install --no-cache-dir \ | |
| "gradio[oauth,mcp]==6.14.0" \ | |
| "uvicorn>=0.14.0" \ | |
| "websockets>=10.4" \ | |
| spaces | |
| # アプリをコピー | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |