rohannsinghal commited on
Commit
5c7d19e
·
1 Parent(s): 358e82f

fix: Use chmod to correct cache directory permissions

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -11,11 +11,11 @@ COPY ./requirements.txt /code/requirements.txt
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
  # --- START: FINAL PERMISSION FIX ---
14
- # Create a writable cache directory AND set the correct owner for the app user
15
- RUN mkdir /code/cache && chown -R user:user /code/cache
16
- # Tell all Hugging Face libraries to use this new directory (the modern way)
 
17
  ENV HF_HOME=/code/cache
18
- # Also set the specific variable for sentence-transformers for good measure
19
  ENV SENTENCE_TRANSFORMERS_HOME=/code/cache
20
  # --- END: FINAL PERMISSION FIX ---
21
 
 
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
  # --- START: FINAL PERMISSION FIX ---
14
+ # Create a writable cache directory by changing its permissions.
15
+ # This allows any user (including the one running the app) to write to it.
16
+ RUN mkdir -p /code/cache && chmod 777 /code/cache
17
+ # Tell all Hugging Face libraries to use this new directory
18
  ENV HF_HOME=/code/cache
 
19
  ENV SENTENCE_TRANSFORMERS_HOME=/code/cache
20
  # --- END: FINAL PERMISSION FIX ---
21