File size: 576 Bytes
20d7f69
 
17205ab
20d7f69
 
17205ab
20d7f69
 
 
17205ab
20d7f69
 
17205ab
20d7f69
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Use the official Python image as a base
FROM python:3.10

# Set the working directory inside the container
WORKDIR /app

# Copy the requirements file and install the dependencies
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Copy all the other files into the container
COPY . .

# Run the FastAPI app using Uvicorn
# The command specifies the module (main) and the app object (app) to run.
# It listens on all interfaces (0.0.0.0) and the default port (7860).
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]