File size: 505 Bytes
b45f120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Base image with Python and necessary tools
FROM python:3.12-slim

# Set the working directory in the container
WORKDIR /app

# Copy the application files to the container
COPY . /app

                                                                                        
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

ENV TRANSFORMERS_CACHE=/tmp
ENV PORT=7860

# Command to run the application
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "2"]