FROM python:3.10-slim WORKDIR /app RUN apt-get update && \ apt-get install -y --no-install-recommends \ curl \ bash \ ca-certificates && \ rm -rf /var/lib/apt/lists/* RUN curl -fsSL https://ollama.com/install.sh | sh # Download the model at build time RUN bash -c "ollama serve & \ until ollama list >/dev/null 2>&1; do sleep 2; done && \ ollama pull qwen3-vl:8b" COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]