Kaan commited on
Commit
dad82da
·
verified ·
1 Parent(s): b605b59

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -2,14 +2,17 @@ FROM python:3.9
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 . .
10
 
11
- # Create the model directory with appropriate permissions
12
- RUN mkdir -p /code/model
13
- RUN chmod -R 777 /code/model
14
-
15
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /code
4
 
5
+ # Set the TRANSFORMERS_CACHE environment variable to a writable directory
6
+ ENV TRANSFORMERS_CACHE=/code/cache
7
+
8
+ # Create the cache directory with appropriate permissions
9
+ RUN mkdir -p /code/cache
10
+ RUN chmod -R 777 /code/cache
11
+
12
  COPY ./requirements.txt /code/requirements.txt
13
 
14
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
15
 
16
  COPY . .
17
 
 
 
 
 
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]