File size: 613 Bytes
b3cc940
 
 
 
 
 
 
 
 
7c9df2e
 
 
 
 
 
 
4acc7e1
b3cc940
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Step 1: Choose a base image
FROM python:3.9

# Step 2: Set the working directory inside the container
WORKDIR /app

# Step 3: Copy the application files to the container
COPY . /app

# Step 5: Create a writable cache directory
RUN mkdir /cache && chmod -R 777 /cache

# Step 6: Set the TRANSFORMERS_CACHE environment variable to the new cache directory
ENV TRANSFORMERS_CACHE=/cache



# Step 4: Install the required dependencies
RUN pip install -r requirements.txt

# Step 5: Expose the necessary port
EXPOSE 5000

# Step 6: Define the entry point command
CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"]