helal94hb1 commited on
Commit
5415e8c
·
1 Parent(s): 280c5bf

feat: Update application with new changes11

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -2,15 +2,18 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /code
4
 
 
 
 
 
5
  COPY ./requirements.txt /code/requirements.txt
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
  COPY ./ /code/
10
 
11
- # --- MODIFIED LINE ---
12
- # Create the data directory and make it world-writable
13
- RUN mkdir data && chmod 777 data
14
 
15
  EXPOSE 7860
16
 
 
2
 
3
  WORKDIR /code
4
 
5
+ # --- ADDED: Set the environment variable for the cache ---
6
+ # This tells all Hugging Face libraries to use a local, writable directory.
7
+ ENV TRANSFORMERS_CACHE="/code/data/cache"
8
+
9
  COPY ./requirements.txt /code/requirements.txt
10
 
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
  COPY ./ /code/
14
 
15
+ # Create the data and cache directories and make them writable
16
+ RUN mkdir -p data/cache && chmod -R 777 data
 
17
 
18
  EXPOSE 7860
19