mike23415 commited on
Commit
b283c96
·
verified ·
1 Parent(s): b5e4830

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -0
Dockerfile CHANGED
@@ -8,6 +8,14 @@ RUN apt-get update && apt-get install -y \
8
  git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
 
 
 
 
 
 
11
  # Copy requirements first for better caching
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
 
8
  git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Create cache directories with proper permissions
12
+ RUN mkdir -p /cache /config && chmod 777 /cache /config
13
+
14
+ # Set environment variables to use the writable directories
15
+ ENV TRANSFORMERS_CACHE=/cache/huggingface
16
+ ENV HF_HOME=/cache/huggingface
17
+ ENV MPLCONFIGDIR=/config/matplotlib
18
+
19
  # Copy requirements first for better caching
20
  COPY requirements.txt .
21
  RUN pip install --no-cache-dir -r requirements.txt