Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| HF_HOME=/root/.cache/huggingface | |
| # 必要最低限のOSパッケージ | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git curl ca-certificates build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # 依存インストール(分けてキャッシュを効かせる) | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --upgrade pip && pip install -r /app/requirements.txt | |
| # アプリ本体 | |
| COPY app.py /app/app.py | |
| COPY modules /app/modules | |
| COPY .env.example /app/.env.example | |
| # ポート(HF側で割り当てられるが、明示しておく) | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Uvicorn で FastAPI(+Gradio) を明示起動 | |
| CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "info"] | |