mars9801 commited on
Commit
3208095
1 Parent(s): 96a6cff

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -0
Dockerfile CHANGED
@@ -10,9 +10,16 @@ COPY requirements.txt /code/
10
  # Install the requirements
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
 
 
 
 
 
 
13
  # Copy the current directory contents into the container at /code
14
  COPY . /code
15
 
16
  # Start the FastAPI app on port 8100
17
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8100"]
18
 
 
 
10
  # Install the requirements
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
+ # Create a directory for the Hugging Face cache and set permissions
14
+ RUN mkdir -p /code/cache && chmod -R 777 /code/cache
15
+
16
+ # Set the TRANSFORMERS_CACHE environment variable to the new cache directory
17
+ ENV TRANSFORMERS_CACHE=/code/cache
18
+
19
  # Copy the current directory contents into the container at /code
20
  COPY . /code
21
 
22
  # Start the FastAPI app on port 8100
23
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8100"]
24
 
25
+