Hajime MATSUMOTO commited on
Commit
ce5bcf8
·
1 Parent(s): a6b7407

Fix permission: use /tmp/training as workdir with proper permissions

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -3
Dockerfile CHANGED
@@ -1,6 +1,7 @@
1
  FROM pytorch/pytorch:2.2.0-cuda12.1-cudnn8-devel
2
 
3
- WORKDIR /app
 
4
 
5
  # 基本パッケージ
6
  RUN apt-get update && apt-get install -y \
@@ -21,8 +22,9 @@ ENV HF_TOKEN=""
21
  ENV HF_HOME=/tmp/hf_cache
22
  ENV TRANSFORMERS_CACHE=/tmp/hf_cache
23
 
24
- # キャッシュディレクトリ作成
25
- RUN mkdir -p /tmp/hf_cache && chmod 777 /tmp/hf_cache
 
26
 
27
  # シングルGPU学習 (L40S 48GB)
28
  CMD ["python", "train.py"]
 
1
  FROM pytorch/pytorch:2.2.0-cuda12.1-cudnn8-devel
2
 
3
+ # 書き込み可能なワークディレクトリ
4
+ WORKDIR /tmp/training
5
 
6
  # 基本パッケージ
7
  RUN apt-get update && apt-get install -y \
 
22
  ENV HF_HOME=/tmp/hf_cache
23
  ENV TRANSFORMERS_CACHE=/tmp/hf_cache
24
 
25
+ # ディレクトリ作成
26
+ RUN mkdir -p /tmp/hf_cache /tmp/training/checkpoints /tmp/training/output && \
27
+ chmod -R 777 /tmp/hf_cache /tmp/training
28
 
29
  # シングルGPU学習 (L40S 48GB)
30
  CMD ["python", "train.py"]