From 9627c6e71618efce462fd2706186718f4fb2136b Mon Sep 17 00:00:00 2001 From: Juan Cubeddu Date: Fri, 9 Jun 2023 16:37:31 -0500 Subject: [PATCH 1/3] Update README.md To resolve the problem of published ports being discarded in the host network mode, delete the "--network='host'" option. --- docker/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/README.md b/docker/README.md index e594fcac..394e649f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -6,10 +6,10 @@ Default password is `admin`. ## Example Runs ```sh -docker run --network="host" -p 8888:8888 -t graph-notebook +docker run -p 8888:8888 -t graph-notebook # Sharing directories -docker run --network="host" -p 8889:8889 -p 8888:8888 -v $(pwd)/out:/working +docker run -p 8889:8889 -p 8888:8888 -v $(pwd)/out:/working # For connecting with IAM Auth docker run -p 8888:8888 \ From 94aa90d2f0d7e843aa19babe87a28d56a861b4d6 Mon Sep 17 00:00:00 2001 From: Juan Cubeddu Date: Mon, 12 Jun 2023 15:05:43 -0500 Subject: [PATCH 2/3] Update README.md I have included extra documentation on the docker network mode and also added relevant local commands to make it easier to follow. --- docker/README.md | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/docker/README.md b/docker/README.md index 394e649f..cfb4d1ea 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,10 +1,33 @@ - - Run `%load_ext graph_notebook.magics` at the top of a notebook to enable gremlin magic like `%%gremlin` Default password is `admin`. ## Example Runs + +```sh +docker run --network="host" -p 8888:8888 -t graph-notebook + +# Sharing directories +docker run --network="host" -p 8889:8889 -p 8888:8888 -v $(pwd)/out:/working + + +# For connecting with IAM Auth +docker run -p 8888:8888 \ + -e AWS_ACCESS_KEY_ID \ + -e AWS_SECRET_ACCESS_KEY \ + -e AWS_SESSION_TOKEN \ + -e AWS_REGION="us-east-1" \ + graph-notebook +``` + +## [Host Networking Mode (--network="host")](url=https://docs.docker.com/network/host/) + +Host mode networking can be useful to optimize performance, and in situations where a container needs to handle a large range of ports, as it does not require network address translation (NAT), and no “userland-proxy” is created for each port. + +The host networking driver only works on **Linux hosts**, and is **not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server**. + +## Example Local Mac/Windows Runs + ```sh docker run -p 8888:8888 -t graph-notebook @@ -24,7 +47,8 @@ Example Notebooks are placed in the `Example Notebooks` sub-directory Within the Jupyter Notebook you must configure the Notebook settings to account for `localhost` or `remote` connections. -### Example Localhost Connection: +### Example Localhost Connection + ```ipynb %%graph_notebook_config { @@ -40,7 +64,8 @@ Within the Jupyter Notebook you must configure the Notebook settings to account } ``` -### Example Neptune Proxy Connection: +### Example Neptune Proxy Connection + ```ipynb { "host": "clustername.cluster-ididididid.us-east-1.neptune.amazonaws.com", @@ -54,8 +79,6 @@ Within the Jupyter Notebook you must configure the Notebook settings to account } ``` - - ## Configurable Properties | Parameter | Description | @@ -77,7 +100,3 @@ Within the Jupyter Notebook you must configure the Notebook settings to account | PROVIDE_EXAMPLES | Whether or not to automatically copy example notebooks over when a volume is being shared. | | GRAPH_NOTEBOOK_PROXY_HOST | Host that will proxy requests to Neptune. Will not proxy if not provided. | | GRAPH_NOTEBOOK_PROXY_PORT | Port for proxy host. | - - - - From 5dbc62cb853f81a8a748dd3cd502082f712c8b68 Mon Sep 17 00:00:00 2001 From: Michael Chin Date: Mon, 12 Jun 2023 18:29:21 -0700 Subject: [PATCH 3/3] Reformat Docker run sections --- docker/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/README.md b/docker/README.md index cfb4d1ea..355e0e6d 100644 --- a/docker/README.md +++ b/docker/README.md @@ -4,6 +4,9 @@ Default password is `admin`. ## Example Runs +### On Linux: +- Note that these commands invoke [host networking mode](https://docs.docker.com/network/host/). This mode is only compatible with Linux, and may cause issues if run on a Mac or Windows host. + ```sh docker run --network="host" -p 8888:8888 -t graph-notebook @@ -20,13 +23,7 @@ docker run -p 8888:8888 \ graph-notebook ``` -## [Host Networking Mode (--network="host")](url=https://docs.docker.com/network/host/) - -Host mode networking can be useful to optimize performance, and in situations where a container needs to handle a large range of ports, as it does not require network address translation (NAT), and no “userland-proxy” is created for each port. - -The host networking driver only works on **Linux hosts**, and is **not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server**. - -## Example Local Mac/Windows Runs +### On Mac/Windows: ```sh docker run -p 8888:8888 -t graph-notebook @@ -43,7 +40,10 @@ docker run -p 8888:8888 \ graph-notebook ``` -Example Notebooks are placed in the `Example Notebooks` sub-directory + +## Post-Launch Configuration + +Example Notebooks are placed in the `Example Notebooks` sub-directory. Within the Jupyter Notebook you must configure the Notebook settings to account for `localhost` or `remote` connections.