shahzaib201 commited on
Commit
c1a8dd4
1 Parent(s): 530ac60

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -6,7 +6,12 @@ COPY ./requirements.txt /code/requirements.txt
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
-
10
  COPY ./main.py /code/main.py
11
 
12
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
 
9
  COPY ./main.py /code/main.py
10
 
11
+ # Set the environment variable for the cache directory
12
+ ENV TRANSFORMERS_CACHE=/code/cache
13
+
14
+ # Ensure the cache directory exists and is writable
15
+ RUN mkdir -p /code/cache && chmod -R 777 /code/cache
16
+
17
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]