File size: 464 Bytes
1b354d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# ベースイメージとして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"]