Docker - Adding GDS after having added APOC?

I've moved to a docker container and pre-installed APOC ... then realised a few days later i needed to start using GDS ...

But I am unable to do:

--env NEO4J_PLUGINS='["graph-data-science"]' \

Gives me an error:

no matches found: --env=NEO4JLABS_PLUGINS=["graph-data-science"]

Any ideas ?

@joshcornejo

What Neo4j version?

Running

 sudo docker run     --publish=7474:7474 --publish=7687:7687  \
                     --user="$(id -u):$(id -g)"    \
  --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \
  --env NEO4J_AUTH=none \
  --env NEO4J_PLUGINS='["apoc", "graph-data-science"]' \
  neo4j:5.18.0

and this is running docker with Neo4j 5.18.0 and with APOC and GDS reports

6d2d3e2e9146: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:b018c04b0d01e7b6b3ff001d297fe2b80d0612a49516a7d20b0beb7f784994bb
Status: Downloaded newer image for neo4j:5.18.0
Installing Plugin 'apoc' from /var/lib/neo4j/labs/apoc-*-core.jar to /var/lib/neo4j/plugins/apoc.jar
Applying default values for plugin apoc to neo4j.conf
Fetching versions.json for Plugin 'graph-data-science' from https://graphdatascience.ninja/versions.json
Installing Plugin 'graph-data-science' from https://graphdatascience.ninja/neo4j-graph-data-science-2.6.2.jar to /var/lib/neo4j/plugins/graph-data-science.jar
Applying default values for plugin graph-data-science to neo4j.conf
2024-03-23 22:17:19.078+0000 INFO  Logging config in use: File '/var/lib/neo4j/conf/user-logs.xml'
2024-03-23 22:17:19.102+0000 INFO  Starting...
2024-03-23 22:17:20.715+0000 INFO  This instance is ServerId{7613fe0a} (7613fe0a-f075-42c3-a116-0e81ca441708)
2024-03-23 22:17:21.747+0000 INFO  ======== Neo4j 5.18.0 ========
2024-03-23 22:17:21.897+0000 INFO  Progress tracking: enabled
2024-03-23 22:17:21.900+0000 INFO  Memory usage guard: minimum estimate
2024-03-23 22:17:21.907+0000 INFO  GDS license file: null
2024-03-23 22:17:21.910+0000 INFO  GDS license state: unlicensed
2024-03-23 22:17:21.921+0000 INFO  Register GraphDataScience...
2024-03-23 22:17:21.946+0000 INFO  GraphDataScience registered.
2024-03-23 22:17:21.954+0000 INFO  Register GraphDataScienceExtras...
2024-03-23 22:17:21.958+0000 INFO  GraphDataScienceExtras registered.
2024-03-23 22:17:21.959+0000 INFO  Register MetricsFacade...
2024-03-23 22:17:21.961+0000 INFO  MetricsFacade registered.
2024-03-23 22:17:21.965+0000 INFO  Register legacy Task Store/ Registry...
2024-03-23 22:17:21.968+0000 INFO  Task Store/ Registry registered.
2024-03-23 22:17:21.969+0000 INFO  Register legacy User Log Registry...
2024-03-23 22:17:21.972+0000 INFO  User Log Registry registered.
2024-03-23 22:17:22.231+0000 INFO  GDS compatibility: for Neo4j Settings 5.x -- available, for Neo4j Settings 4.4 -- not available, selected: Neo4j Settings 5.x
2024-03-23 22:17:22.232+0000 INFO  GDS compatibility: for Neo4j 4.4 -- not available, for Neo4j 5.11 -- not available, for Neo4j 5.12 -- not available, for Neo4j 5.13 -- not available, for Neo4j 5.14 -- not available, for Neo4j 5.15 -- not available, for Neo4j 5.16 -- not available, for Neo4j 5.17 -- not available, for Neo4j 5.18 -- available, selected: Neo4j 5.18
2024-03-23 22:17:44.786+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2024-03-23 22:17:46.383+0000 INFO  HTTP enabled on 0.0.0.0:7474.
2024-03-23 22:17:46.385+0000 INFO  Remote interface available at http://localhost:7474/
2024-03-23 22:17:46.391+0000 INFO  id: 841CEF5DFC36FCD176BD7F1B576384B3566BF82321A22CECAC2718F9CFA2B5AB
2024-03-23 22:17:46.392+0000 INFO  name: system
2024-03-23 22:17:46.394+0000 INFO  creationDate: 2024-03-23T22:17:23.453Z
2024-03-23 22:17:46.394+0000 INFO  Started.

suggesting GDS and APOC were installed.

Can you reply back with the complete docker command run?

After installing APOC, this is the command generated by docker:

docker run --hostname=11f7997a2d9f --env=NEO4J_apoc_export_file_enabled=true --env=NEO4J_apoc_import_file_enabled=true --env=NEO4J_apoc_import_file_use__neo4j__config=true --env=NEO4JLABS_PLUGINS=["apoc"] --env=PATH=/var/lib/neo4j/bin:/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=JAVA_HOME=/opt/java/openjdk --env=NEO4J_SHA256=8cd8bc48ad59f24e9949cf5a6be2fe3e100ac9eb344efea616ea0ab296411089 --env=NEO4J_TARBALL=neo4j-community-5.18.1-unix.tar.gz --env=NEO4J_EDITION=community --env=NEO4J_HOME=/var/lib/neo4j --volume=/data --volume=/logs --workdir=/var/lib/neo4j -p 8473:7473 -p 8474:7474 -p 8687:7687 --restart=no --runtime=runc -d neo4j:latest

I've found an error as docker is not single-quoting the plugins:

--env=NEO4JLABS_PLUGINS=["apoc"]

I ran the right command (which was what i was running, without the single quotes), and ended with another container, not the one i was using updated.

@joshcornejo what do you mean "command generated by docker"? What are you doing to get docker to generate these commands?

The option: "copy docker run"

Screenshot 2024-03-25 at 10.03.13

@jenny.owen - do you have any guidance for this?

@joshcornejo

although i cant say if this is the cause your update of


After installing APOC, this is the command generated by docker:

docker run --hostname=11f7997a2d9f --env=NEO4J_apoc_export_file_enabled=true --env=NEO4J_apoc_import_file_enabled=true --env=NEO4J_apoc_import_file_use__neo4j__config=true --env=NEO4JLABS_PLUGINS=["apoc"] --env=PATH=/var/lib/neo4j/bin:/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=JAVA_HOME=/opt/java/openjdk --env=NEO4J_SHA256=8cd8bc48ad59f24e9949cf5a6be2fe3e100ac9eb344efea616ea0ab296411089 --env=NEO4J_TARBALL=neo4j-community-5.18.1-unix.tar.gz --env=NEO4J_EDITION=community --env=NEO4J_HOME=/var/lib/neo4j --volume=/data --volume=/logs --workdir=/var/lib/neo4j -p 8473:7473 -p 8474:7474 -p 8687:7687 --restart=no --runtime=runc -d neo4j:latest

is a bit odd in the sense that you include --env=NEO4J_TARBALL=neo4j-community-5.18.1-unix.tar.gz .
I'm not aware of any customer who uses -env=NEO4J_TARBALL= and or we dont document its usage at Docker - Operations Manual which is what I suspect most all users follow.

This is similar to my post 11 days ago where I posted

Running

 sudo docker run     --publish=7474:7474 --publish=7687:7687  \
                     --user="$(id -u):$(id -g)"    \
  --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \
  --env NEO4J_AUTH=none \
  --env NEO4J_PLUGINS='["apoc", "graph-data-science"]' \
  neo4j:5.18.0


and this is running docker with Neo4j 5.18.0 and with APOC and GDS reports
....
.......
.........

if you do as describe do you encounter the same concerns.

1 Like

@joshcornejo

any progress? i see you have posted a new issue and didnt know if you were now past this or... and if resolved what was done?

Not touched the docker container yet - busy with other stuff at the moment.

I'll try to catch up with this, but a couple of notes:

  1. the docker command is generated by docker - not by me (I only add the plugins), the rest comes out of that menu option I raised earlier in this thread.

  2. I already have an image with data and all - I only want to "add" a plugin to it, not start one from scratch (I could have done that already).

I hadn't been checking and have also realised that this command is to create a new container - what i need is to inject the graph-data-science plugin into an existing container.

$ docker container start <inject graph-data-science>

is the command I need.