File size: 371 Bytes
ac57245
933256c
 
 
ac57245
 
 
 
 
 
933256c
 
 
 
 
618c397
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM python:3.9

WORKDIR /app

# Create a directory for the cache
RUN mkdir -p /app/cache && chmod 777 /app/cache

# Set the TRANSFORMERS_CACHE environment variable
ENV TRANSFORMERS_CACHE=/app/cache

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# Use Gunicorn to run the Flask app
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]