Spaces:
Running on Zero
Running on Zero
| # ベースイメージとしてPython 3.12を使用 | |
| FROM python:3.12-slim | |
| # 作業ディレクトリの設定 | |
| WORKDIR /app | |
| # 依存関係をコピーしてインストール (requirements.txt 内でコンパイル済みのCPU版を指定済み) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # ソースコードをコピー | |
| COPY . . | |
| # FastAPIサーバーを起動 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |