Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Widget doesn't render in remote Jupyter Lab #10

Closed
mofojed opened this issue Mar 29, 2023 · 0 comments · Fixed by #12
Closed

Table Widget doesn't render in remote Jupyter Lab #10

mofojed opened this issue Mar 29, 2023 · 0 comments · Fixed by #12
Assignees
Labels
bug Something isn't working

Comments

@mofojed
Copy link
Member

mofojed commented Mar 29, 2023

Description

When trying to open a table in Jupyter Lab on a remote machine, it fails to open. @chipkent reported this when building the new demo system.
May be related to #3. The URL for the iframe is based on localhost:

server_url = f"http://localhost:{Server.instance.port}/"
. We probably need to proxy it, there are some Jupyter docs about using the Jupyter proxy: https://jupyter-server-proxy.readthedocs.io/en/latest/arbitrary-ports-hosts.html#from-jupyterlab-extension

Steps to reproduce
Haven't tried to reproduce locally yet, could perhaps start up a Jupyter lab within a VM or docker container and it should run into this issue though.

  1. Navigate to the new demo system: https://controller.try-dh.demo.community.deephaven.io/
  2. Select Jupyter Demo
  3. Run all the cells down to "Display a table"

Expected results
3. A table displays with the data requested

Actual results
3. An error is displayed. Inspecting the element on the iframe reveals the link to be pointing to localhost (e.g. http://localhost:8080/iframe/table/?name=t_cb8a51e8_a98e_4607_b53d_513f025cd844).
image

@mofojed mofojed added the bug Something isn't working label Mar 29, 2023
jnumainville added a commit that referenced this issue Apr 10, 2023
Fixes #10
Verified by creating a docker container:

docker run -p 10000:8888 -p 8080:1234 ghcr.io/deephaven/deephaven-kube-demo-worker-jupyter:main
Then running the following code in a jupyter notebook in the docker container:

from deephaven_server import Server

s = Server(port=1234, jvm_args=["-Xmx10g"])
s.start()

from deephaven_ipywidgets import DeephavenWidget
from deephaven.plot.figure import Figure
from deephaven import empty_table
from deephaven import time_table
from deephaven import ugp

static_table = empty_table(100).update(["X = i", "Y = Math.sin(0.1 * X)"])

import os
os.environ['DEEPHAVEN_IPY_URL'] = "http://localhost:8080/"

static_widget = DeephavenWidget(static_table)
display(static_widget)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants