Your Name Claude commited on
Commit
a4a97b6
·
1 Parent(s): a1a605d

Fix: Set writable cache directory for HuggingFace downloads

Browse files

Fixes permission denied errors when downloading dataset files.
Sets HF_HOME and related cache paths to /tmp which is writable in Docker.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +5 -0
Dockerfile CHANGED
@@ -2,6 +2,11 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
5
  # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  git \
 
2
 
3
  WORKDIR /app
4
 
5
+ # Set Hugging Face cache to writable directory
6
+ ENV HF_HOME=/tmp/huggingface
7
+ ENV TRANSFORMERS_CACHE=/tmp/huggingface/transformers
8
+ ENV HF_DATASETS_CACHE=/tmp/huggingface/datasets
9
+
10
  # Install system dependencies
11
  RUN apt-get update && apt-get install -y \
12
  git \