File size: 456 Bytes
36b8828
 
 
 
 
 
ee3a766
36b8828
 
ee3a766
 
 
 
1a35faa
36b8828
ee3a766
 
2262d7f
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.9

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt

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

# Explicitly install Uvicorn
RUN pip install uvicorn

# Copy the rest of the application
COPY . .

# Command to run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]

# Set the environment variable for Matplotlib cache
ENV MPLCONFIGDIR=/tmp/matplotlib