File size: 649 Bytes
0f4a8fd
 
 
 
 
 
ee97ab4
0f4a8fd
 
 
ee97ab4
 
 
 
0f4a8fd
ee97ab4
 
0f4a8fd
 
ee97ab4
0f4a8fd
 
ee97ab4
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 an official Python runtime as a parent image
FROM python:3.10.14-slim-bullseye

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . .

# Install any needed packages specified in requirements.txt
RUN apt-get update -y && \
    apt-get install -y libgl1-mesa-glx libglib2.0-0 && \
    pip3 install --no-cache-dir -r requirements.txt && \
    apt-get clean

# Install Uvicorn
RUN pip3 install uvicorn

# Make port 5000 available to the world outside this container
EXPOSE 7860

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