FROM ollama/ollama:latest # Install Python deps RUN apt-get update && apt-get install -y python3-pip COPY requirements.txt . RUN pip install -r requirements.txt # Pre-pull GPT-2 so it’s ready RUN ollama pull gpt2 COPY app.py . EXPOSE 7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]