audio-text / Dockerfile
soiz's picture
Update Dockerfile
a3f058b verified
raw
history blame contribute delete
667 Bytes
FROM python:3.9-slim
# 必要なパッケージをインストール
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# 作業ディレクトリを設定
WORKDIR /app
# アプリケーションファイルをコピー
COPY . /app
# キャッシュ用ディレクトリを作成
RUN mkdir -p /tmp/.cache && chmod -R 777 /tmp/.cache
# 環境変数を設定
ENV TRANSFORMERS_CACHE=/tmp/.cache
# 必要なPythonパッケージをインストール
RUN pip install --no-cache-dir -r requirements.txt
# アプリケーションを実行
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860"]