ktsn-ud commited on
Commit
fc411a2
·
1 Parent(s): 9269049

data/に対して全てに書き込み権限を与えた

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. scripts/2_create_projects_data.py +3 -0
Dockerfile CHANGED
@@ -16,8 +16,8 @@ RUN pip install --no-cache-dir --upgrade pip && \
16
  COPY . .
17
 
18
  # データディレクトリを作成し、権限を付与
19
- # data は実行ユーザーから書き込み可能に
20
- RUN mkdir -p data/generated && chmod -R 775 data
21
 
22
  # embeddings は hf_hub_download が local_dir 配下に `.cache/huggingface` を作るため
23
  # 実行ユーザーからの書き込みを許可する(環境により非root実行のため 777 を許容)
 
16
  COPY . .
17
 
18
  # データディレクトリを作成し、権限を付与
19
+ # data は実行ユーザーから書き込み可能に(非root環境を考慮し 777)
20
+ RUN mkdir -p data/generated && chmod -R 777 data
21
 
22
  # embeddings は hf_hub_download が local_dir 配下に `.cache/huggingface` を作るため
23
  # 実行ユーザーからの書き込みを許可する(環境により非root実行のため 777 を許容)
scripts/2_create_projects_data.py CHANGED
@@ -56,6 +56,9 @@ def main():
56
  projects_schema.Project(**row) for row in df.to_dict(orient="records")
57
  ]
58
 
 
 
 
59
  # JSON に書き出し
60
  json_dumps([item.model_dump() for item in projects], output_json_path)
61
 
 
56
  projects_schema.Project(**row) for row in df.to_dict(orient="records")
57
  ]
58
 
59
+ # 出力先ディレクトリ作成(念のため)
60
+ os.makedirs(os.path.dirname(output_json_path), exist_ok=True)
61
+
62
  # JSON に書き出し
63
  json_dumps([item.model_dump() for item in projects], output_json_path)
64