Louisljz's picture
fix port & add norm
f02ac30
raw
history blame contribute delete
653 Bytes
# Use official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Install opencv dependency
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0
# Copy the requirements file into the container
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the FastAPI application code into the container
COPY . .
# Expose port 7860 for the FastAPI application
EXPOSE 7860
# Command to run the FastAPI application using uvicorn
WORKDIR /app/app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]