VimalrajS04 commited on
Commit
6ba9cad
·
1 Parent(s): a4ae348

Resolving docker error

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -9,13 +9,13 @@ RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 libsm6 libxext6 &&
9
  # Set the working directory inside the container
10
  WORKDIR /code
11
 
12
- # Set a writable cache directory for doctr inside our work directory
13
- ENV DOCTR_CACHE_DIR=".cache/doctr"
 
14
 
15
- # --- THIS IS THE NEW LINE ---
16
- # Pre-create the cache directory and make it writable by any user
17
- RUN mkdir -p .cache/doctr && chmod 777 -R .cache
18
- # --- END OF NEW LINE ---
19
 
20
  # Copy the requirements file and install packages
21
  COPY requirements.txt .
 
9
  # Set the working directory inside the container
10
  WORKDIR /code
11
 
12
+ # Set writable cache directories for ALL model libraries
13
+ ENV DOCTR_CACHE_DIR="/code/.cache/doctr"
14
+ ENV HF_HOME="/code/.cache/huggingface"
15
 
16
+ # Pre-create all cache directories and make them writable
17
+ RUN mkdir -p /code/.cache/doctr /code/.cache/huggingface && \
18
+ chmod 777 -R /code/.cache
 
19
 
20
  # Copy the requirements file and install packages
21
  COPY requirements.txt .