OLLAMA / Dockerfile
akra35567's picture
Update Dockerfile
bdae3c4 verified
raw
history blame
546 Bytes
FROM python:3.11-slim
RUN apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://ollama.com/install.sh | sh
WORKDIR /app
COPY requirements.txt .
COPY app.py .
COPY database.py .
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 7860
# CORRIGIDO: phi3.5 → phi3
RUN ollama serve & sleep 25 && ollama pull phi3:mini-4k-instruct-q4_0 && kill $!
HEALTHCHECK --interval=30s CMD curl -f http://localhost:7860/health || exit 1
ENV OLLAMA_NUM_PARALLEL=3
CMD ["python", "app.py"]