| # ベースイメージを選択 | |
| FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9 | |
| # 作業ディレクトリを設定 | |
| WORKDIR /app | |
| RUN mkdir /CACHE/ && chmod -R 777 /CACHE/ | |
| ENV TRANSFORMERS_CACHE /CACHE/ | |
| # 依存関係をインストール | |
| #COPY requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # FastAPIアプリケーションのコードをコピー | |
| #COPY app /app | |
| COPY . /app | |
| # Command to run the application | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |