yummyu commited on
Commit
bb40a26
·
verified ·
1 Parent(s): f33f483

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -0
Dockerfile CHANGED
@@ -9,6 +9,15 @@ RUN apt-get update && apt-get install -y \
9
  curl \
10
  && rm -rf /var/lib/apt/lists/*
11
 
 
 
 
 
 
 
 
 
 
12
  # Pythonの依存関係をコピーしてインストール
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
 
9
  curl \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # キャッシュディレクトリを作成し、権限を設定
13
+ RUN mkdir -p /app/.cache && \
14
+ chmod 777 /app/.cache
15
+
16
+ # 環境変数でキャッシュディレクトリを指定
17
+ ENV HF_HOME=/app/.cache
18
+ ENV TRANSFORMERS_CACHE=/app/.cache
19
+ ENV HUGGINGFACE_HUB_CACHE=/app/.cache
20
+
21
  # Pythonの依存関係をコピーしてインストール
22
  COPY requirements.txt .
23
  RUN pip install --no-cache-dir -r requirements.txt