soiz commited on
Commit
a3f058b
·
verified ·
1 Parent(s): 801d1c9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -8,14 +8,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
8
  # 作業ディレクトリを設定
9
  WORKDIR /app
10
 
11
- # アプリケーションのファイルをコピー
12
  COPY . /app
13
 
 
 
 
 
 
 
14
  # 必要なPythonパッケージをインストール
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # gunicornをインストール (必要な場合)
18
- RUN pip install gunicorn
19
-
20
- # アプリケーションの実行
21
  CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860"]
 
8
  # 作業ディレクトリを設定
9
  WORKDIR /app
10
 
11
+ # アプリケーションファイルをコピー
12
  COPY . /app
13
 
14
+ # キャッシュ用ディレクトリを作成
15
+ RUN mkdir -p /tmp/.cache && chmod -R 777 /tmp/.cache
16
+
17
+ # 環境変数を設定
18
+ ENV TRANSFORMERS_CACHE=/tmp/.cache
19
+
20
  # 必要なPythonパッケージをインストール
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
+ # アプリケーションを実行
 
 
 
24
  CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860"]