FROM ollama/ollama # Install Python and dependencies RUN apt-get update && apt-get install -y \ python3 \ python3-pip \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY ./requirements.txt /app/requirements.txt COPY ./app.py /app/app.py COPY ./templates /app/templates RUN pip3 install --no-cache-dir -r requirements.txt EXPOSE 7860 11434 # Run Ollama and FastAPI app # Run Ollama and FastAPI app # Run Ollama and FastAPI app CMD ["ollama", "serve", "&", "sleep", "5", "&&", "ollama", "pull", "gemma:2b", "&&", "python3", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]