File size: 679 Bytes
8e187c7
89cdc78
 
8e187c7
89cdc78
 
e032779
 
 
 
 
 
8e187c7
89cdc78
 
8e187c7
e032779
89cdc78
8e187c7
89cdc78
 
8e187c7
7d27e85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use a base image with Python 3.9
FROM python:3.9

# Set the working directory in the container
WORKDIR /code

# Create a writable directory for the Transformers cache
RUN mkdir -p /transformers_cache

# Set the TRANSFORMERS_CACHE environment variable to the writable directory
ENV TRANSFORMERS_CACHE=/transformers_cache

# Copy the requirements file to the container
COPY ./requirements.txt /code/requirements.txt

# Install the Python dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy the entire content of the current directory into the container
COPY . .

# Specify the command to run when the container starts
CMD ["python", "app.py"]