[CHORE] Fix local Jupyter permissions and rename the Compose project - #492
[CHORE] Fix local Jupyter permissions and rename the Compose project#492KilianTrunk wants to merge 3 commits into
Conversation
Co-authored-by: Matic <majericmatic@gmail.com> Co-authored-by: Tom Soru <tom@tommaso-soru.it>
|
Thank you for this. I will take a look at this asap. |
| plotly | ||
|
|
||
| # LlamaIndex readers (hard imports in lexical-graph source) | ||
| USER root |
There was a problem hiding this comment.
is this necessary? I didn't think pip install required root access. We should keep the USER root call before the apt-get calls instead.
There was a problem hiding this comment.
I think this might make more sense in the follow-up PR when we do other installations. I just quite understand the problem with the current build.
There was a problem hiding this comment.
It's necessary, I can reproduce the failure from current main branch and it fails with:
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/opt/conda/lib/python3.11/site-packages/backports/zstd'
Yeah pip install itself does not need the root, but the problem is that the earlier root-level Conda/pip step leaves files under /opt/conda that jovyan can't update.
The first version of this PR worked around that by installing the readers as root and repairing the permissions afterwards however I now changed it so that the permissions are repaired immediately after the root-level Conda/pip step instead.
| @@ -1,4 +1,4 @@ | |||
| name: local-dev | |||
| name: graphrag-toolkit-rdf-dev | |||
There was a problem hiding this comment.
this can cause migration issues. Can you pin the names of the volumes too?
Update lines 58...:
volumes:
# Pin explicit volume names so a Compose project rename does not orphan
# existing data. With an explicit name Compose uses it verbatim (no project
# prefix), so these always map to the same on-disk volumes regardless of the
# top-level `name:`.
neo4j_local_data_dev:
name: local-dev_neo4j_local_data_dev
neo4j_local_logs_dev:
name: local-dev_neo4j_local_logs_dev
pgvector_local_data_dev:
name: local-dev_pgvector_local_data_dev
There was a problem hiding this comment.
Hi Andrew, I have added the names for all three volumes and also I tested the rename path with an existing volume from the old project, and the renamed Compose project mounted the same volume instead of creating a new empty one 🙌
mykola-pereyma
left a comment
There was a problem hiding this comment.
The fix-permissions "${CONDA_DIR}" change and the volume pinning look good. One request on the Compose project rename — see the inline note on the name: line.
| @@ -1,4 +1,4 @@ | |||
| name: local-dev | |||
| name: graphrag-toolkit-rdf-dev | |||
There was a problem hiding this comment.
graphrag-toolkit-rdf-dev is out of step here — this stack runs neo4j-local + pgvector-local (not an RDF store), the SPARQL package that motivates "rdf" isn't in main yet, and it breaks the existing naming set (local-standard, local-dev, hybrid-standard, hybrid-dev).
Could we keep this PR as the permissions chore and leave the project as local-dev? The rdf naming would then land with the SPARQL store PR, where it matches reality.
Description
This PR isolates the local lexical-graph development-environment changes requested during the review of #405.
It ensures that the Jupyter development image performs reader and system dependency installation with the required privileges, repairs permissions before returning to the notebook user, and gives the Docker Compose project a repository-specific name.
It contains no core graph-operation changes, SPARQL implementation, documentation, notebooks,
.dockerignore, orDockerfile.hub.Changes
local-devtographrag-toolkit-rdf-dev.rootbefore installing the LlamaIndex reader dependencies and PyMuPDF.root.fix-permissionsfor the Conda installation and notebook-user home directory after root-level installation.jovyanuser for the final image runtime.Problem
The local Jupyter image performs package and system installation steps that require root privileges, but it must leave the Conda environment and notebook home directory writable by the final
jovyanuser.The Compose project also used the generic name
local-devinstead of a repository-specific name.Related issue (if any): N/A
Compatibility note
Changing the Compose project name changes the generated Docker network and named-volume prefixes.
Existing resources created under the previous
local-devproject name are not automatically reused undergraphrag-toolkit-rdf-dev. Explicit container names and host ports are unchanged.Testing
pytest) — not run because no Python source changedValidation performed:
jupyter-localimage build: passed.jovyan./opt/conda,/home/jovyan, and/tmp/pip-cacheare writable by the runtime user.fitzllama_index.readers.webllama_index.readers.filellama_index.readers.githubllama_index.readers.jsonllama_index.readers.s3llama_index.readers.structured_datagit diff --check upstream/main..HEAD: no errors.upstream/main: no conflicts.Checklist
The Docker Compose project-name compatibility impact is documented above.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.