dljdd commited on
Commit
e032779
·
1 Parent(s): c992372

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -3
Dockerfile CHANGED
@@ -4,15 +4,20 @@ FROM python:3.9
4
  # Set the working directory in the container
5
  WORKDIR /code
6
 
 
 
 
 
 
 
7
  # Copy the requirements file to the container
8
  COPY ./requirements.txt /code/requirements.txt
9
 
10
  # Install the Python dependencies
11
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt -q langchain transformers accelerate bitsandbytes
12
-
13
 
14
  # Copy the entire content of the current directory into the container
15
  COPY . .
16
 
17
  # Specify the command to run when the container starts
18
- CMD ["python", "app.py"]
 
4
  # Set the working directory in the container
5
  WORKDIR /code
6
 
7
+ # Create a writable directory for the Transformers cache
8
+ RUN mkdir -p /transformers_cache
9
+
10
+ # Set the TRANSFORMERS_CACHE environment variable to the writable directory
11
+ ENV TRANSFORMERS_CACHE=/transformers_cache
12
+
13
  # Copy the requirements file to the container
14
  COPY ./requirements.txt /code/requirements.txt
15
 
16
  # Install the Python dependencies
17
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
18
 
19
  # Copy the entire content of the current directory into the container
20
  COPY . .
21
 
22
  # Specify the command to run when the container starts
23
+ CMD ["python", "your_script.py"]