bitflicker64 commented on code in PR #399:
URL: https://github.com/apache/hugegraph-ai/pull/399#discussion_r4505347154
##########
docker/Dockerfile.nk:
##########
@@ -1,25 +1,57 @@
+# syntax=docker/dockerfile:1
+
# Stage 1: Build stage (Isolating the build env)
ARG PYTHON_VERSION=3.12
FROM python:${PYTHON_VERSION}-bookworm AS builder
+ARG UV_VERSION=0.13.6
+ENV UV_LINK_MODE=copy
WORKDIR /build/
-# Use uv instead of poetry for a more efficient, elegant, and unified py env
management
-RUN pip install --no-cache-dir uv
+RUN apt-get update && \
+ apt-get install -y --no-install-recommends build-essential patchelf && \
+ rm -rf /var/lib/apt/lists/*
+
+# Keep the build tool aligned with the repository CI configuration.
+RUN --mount=type=secret,id=proxy_ca \
+ if [ -f /run/secrets/proxy_ca ]; then export
PIP_CERT=/run/secrets/proxy_ca; fi; \
+ pip install --no-cache-dir "uv==${UV_VERSION}"
+
+# Install the committed dependency graph before application source invalidates
+# the layer. Registry cache reuses the completed environment when metadata or
the
+# lockfile is unchanged; the uv cache mount mainly helps persistent local
builders.
+COPY pyproject.toml uv.lock README.md ./
+COPY hugegraph-llm/pyproject.toml hugegraph-llm/README.md ./hugegraph-llm/
+COPY hugegraph-llm-sdk/pyproject.toml hugegraph-llm-sdk/README.md
./hugegraph-llm-sdk/
+COPY hugegraph-python-client/pyproject.toml hugegraph-python-client/README.md
./hugegraph-python-client/
+COPY vermeer-python-client/pyproject.toml vermeer-python-client/README.md
./vermeer-python-client/
+RUN --mount=type=cache,target=/root/.cache/uv \
+ --mount=type=secret,id=proxy_ca \
+ if [ -f /run/secrets/proxy_ca ]; then \
+ export SSL_CERT_FILE=/run/secrets/proxy_ca
GIT_SSL_CAINFO=/run/secrets/proxy_ca; \
+ fi; \
+ uv sync --locked --no-install-workspace --extra nk-llm
Review Comment:
Important: `scripts/version.py sync` and dependency edits leave `uv.lock`
stale, and CI runs `uv sync` without `--locked`, so the drift passes CI and
first fails here when the `rag-bin` image is built. Add a `uv lock --check`
step to CI so the PR that changes package metadata must refresh the lock.
After bumping the root version to `1.9.0` and running `scripts/version.py
sync`, `scripts/version.py check` passes and `uv lock --check` fails with `The
lockfile at uv.lock needs to be updated`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]