wordVec / Dockerfile
wwefih's picture
Update Dockerfile
b2b4b0a verified
Raw
History Blame Contribute Delete
491 Bytes
# ベースとなるOS+Pythonの環境を指定
FROM python:3.11.15
# コンテナ内の作業ディレクトリを指定
WORKDIR /app
# requirements.txtだけ先にコピーしてインストール
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 残りのファイル(app.py等)をコピー
COPY . .
# HF SpaceはPort7860を使う決まり
EXPOSE 7860
# サーバー起動コマンド
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]