Ezmary commited on
Commit
6fcb7f8
·
verified ·
1 Parent(s): 8aaa70f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -5,10 +5,13 @@ FROM python:3.9-slim
5
  # Set the working directory in the container
6
  WORKDIR /app
7
 
8
- # --- START OF FIX ---
9
- # Set an environment variable to tell huggingface_hub to use a writable directory for its cache.
10
  ENV HF_HOME=/app/cache
11
- # --- END OF FIX ---
 
 
 
12
 
13
  # Copy the requirements file into the container at /app
14
  COPY requirements.txt .
 
5
  # Set the working directory in the container
6
  WORKDIR /app
7
 
8
+ # --- START OF FINAL FIX ---
9
+ # 1. Set the environment variable for the cache location
10
  ENV HF_HOME=/app/cache
11
+
12
+ # 2. Create the cache directory AND give it full write permissions during the build process
13
+ RUN mkdir -p /app/cache && chmod -R 777 /app/cache
14
+ # --- END OF FINAL FIX ---
15
 
16
  # Copy the requirements file into the container at /app
17
  COPY requirements.txt .