my-AI-api / Dockerfile
TKgumi's picture
Update Dockerfile
18026e1 verified
raw
history blame contribute delete
518 Bytes
# Python 3.9の公式イメージを使用
FROM python:3.9
# 作業ディレクトリの設定
WORKDIR /app
# OpenCVの依存ライブラリをインストール(libGL.so.1の問題を解決)
RUN apt-get update && apt-get install -y libgl1-mesa-glx
# 依存パッケージをインストール
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# アプリのコードをコピー
COPY . .
# FastAPIアプリを起動
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]