File size: 722 Bytes
8fe59a0
 
 
 
 
 
 
 
 
 
 
44c1286
8fe59a0
 
 
 
 
 
 
 
 
 
 
 
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
# Use an official Python runtime as a parent image
FROM python:3.11

# Set the working directory in the container
WORKDIR /app

# Copy the requirements file into the container at /app
COPY requirements.txt /app/requirements.txt

# Install any dependencies specified in requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

# Copy the rest of the working directory contents into the container at /app
COPY app.py /app

# Make port 8000 available to the world outside this container
EXPOSE 2000

# Health check to ensure the container is running
HEALTHCHECK CMD curl --fail http://localhost:2000 || exit 1

# Run uvicorn server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "2000"]