# Use an official Python runtime as a parent image FROM python:3.10-slim # Set the working directory in the container WORKDIR /app # Install system dependencies needed for Ollama RUN apt-get update && apt-get install -y curl # Install Ollama using the official installation script RUN curl -fsSL https://ollama.com/install.sh | sh # Copy your application's requirements file COPY requirements.txt . # Install Python packages RUN pip install --no-cache-dir -r requirements.txt # Copy all your application files into the container COPY . . # Make the startup script executable RUN chmod +x ./startup.sh # Expose the port Gradio runs on EXPOSE 7860 # Set the command to run when the container starts CMD ["./startup.sh"]