BFManza commited on
Commit
147ad95
·
1 Parent(s): a0b526b

uPDATE DOCKER FILE

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -1
Dockerfile CHANGED
@@ -4,6 +4,12 @@ FROM python:3.9
4
  # Set the working directory in the container to /app
5
  WORKDIR /app
6
 
 
 
 
 
 
 
7
  # Copy the current directory contents into the container at /app
8
  COPY . /app
9
 
@@ -11,4 +17,4 @@ COPY . /app
11
  RUN pip install --trusted-host pypi.python.org fastapi[all] uvicorn langchain sentence_transformers faiss-cpu ctransformers
12
 
13
  # Run the command to start uvicorn
14
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
4
  # Set the working directory in the container to /app
5
  WORKDIR /app
6
 
7
+ # Create a directory for the transformers cache
8
+ RUN mkdir -p /transformers_cache
9
+
10
+ # Set the environment variable for transformers cache
11
+ ENV TRANSFORMERS_CACHE=/transformers_cache
12
+
13
  # Copy the current directory contents into the container at /app
14
  COPY . /app
15
 
 
17
  RUN pip install --trusted-host pypi.python.org fastapi[all] uvicorn langchain sentence_transformers faiss-cpu ctransformers
18
 
19
  # Run the command to start uvicorn
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]