File size: 530 Bytes
22947a0 2985cd5 22947a0 cb91370 85136bc 2985cd5 85136bc 22947a0 0011cae 2985cd5 22947a0 ba713bc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Use an official Python runtime as the base image
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code to the container
COPY . /app/
# Expose the port the application will run on
EXPOSE 7860
# Define the command to run the application
CMD ["uvicorn", "src.api.main:app", "--host", "0.0.0.0", "--port", "7860", "--forwarded-allow-ips", "*"]
|