From 37d67385f497f66ba9d153ee835885a526f4d5ac Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Sun, 25 Oct 2026 11:47:40 +0100 Subject: [PATCH] Dockerfile: install rocksdb-ng in its own layer, so code changes do not recompile it Co-Authored-By: Claude Sonnet 5.5 --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e465c19..0dc0b6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,14 @@ RUN apt-get update \ pkg-config \ && rm -rf /var/lib/apt/lists/* +# rocksdb-ng is compiled from source (a single C++ translation unit, slow, especially under QEMU for arm64): install it +# in its own layer, before the source is copied, so that changing the code does not recompile it +RUN python -m venv venv \ + && venv/bin/pip install --no-cache-dir rocksdb-ng + COPY pyproject.toml README.md LICENCE MANIFEST.in ./ COPY src ./src -RUN python -m venv venv \ - && venv/bin/pip install --no-cache-dir ".[rocksdb]" +RUN venv/bin/pip install --no-cache-dir ".[rocksdb]" FROM python:3.14-slim-trixie