sql-lite-chat / Dockerfile
redfernstech's picture
Update Dockerfile
7f20f11 verified
raw
history blame
568 Bytes
FROM python:3.11-slim as base
WORKDIR /app
# Install system tools
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Install Ollama
RUN curl -fsSL https://ollama.com/install.sh | bash
ENV PATH="/root/.ollama/bin:$PATH"
RUN ollama serve & sleep 5 && ollama pull mannix/defog-llama3-sqlcoder-8b:latest && echo "Done. Stop Ollama..." && systemctl stop ollama
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["sh", "-c", "ollama serve & uvicorn app.main:app --host 0.0.0.0 --port 8000"]