# Use Python base image FROM python:3.12 # Set working directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ git \ libgl1 \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender1 \ && rm -rf /var/lib/apt/lists/* # Copy requirements file COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt RUN python -c "import clip; clip.load('ViT-B/32', device = 'cpu', jit=False)" # Copy the application code and models COPY ./Apps ./Apps COPY ./Lib/Models ./Models # Expose the port EXPOSE 8000 # Command to run the FastAPI application CMD ["uvicorn", "Apps.app:app", "--host", "0.0.0.0", "--port", "8000"]