Generalized + redeployable: config via env, local Ollama embeddings, single portable sqlite-vec db, hybrid dense+FTS5 recall, mandatory credential scrub.
18 lines
599 B
Docker
18 lines
599 B
Docker
# SecondBrain — engine image. Bring your own Ollama (set OLLAMA_URL).
|
|
FROM python:3.12-slim
|
|
|
|
WORKDIR /opt/secondbrain
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY brain.py .
|
|
COPY deploy/ ./deploy/
|
|
|
|
# The db lives on a mounted volume so it survives container rebuilds.
|
|
ENV BRAIN_HOME=/data
|
|
VOLUME ["/data"]
|
|
|
|
# Default: show stats. Override the command, e.g.:
|
|
# docker run --rm -v sbdata:/data -e OLLAMA_URL=http://host.docker.internal:11434 \
|
|
# secondbrain recall "what did we decide about pricing" --hybrid
|
|
ENTRYPOINT ["python3", "brain.py"]
|
|
CMD ["stats"]
|