Spaces:
Sleeping
Sleeping
File size: 653 Bytes
aa9dbf8 f02ac30 aa9dbf8 f02ac30 |
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 26 27 |
# 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"]
|