Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

[Feature Request] Ability to Run Jupyter Dash in a Kernel's Python Environment #102

Open
danielyahn opened this issue Sep 15, 2022 · 0 comments

Comments

@danielyahn
Copy link

Per Jupyterhub documentation, it's recommended to have 2 separate environments for the single-user server and the user's kernel.

Jupyterhub requires jupyter-server-proxy to properly route the traffic. It is also recommended to install jupyter-server-proxy in the server environment.

However, in the two-python-environment set up, jupyter-dash can't detect the proxy unless I apply a workaround.

Proposed change

Assuming that

  • jupyter-dash is installed in user's kernel
  • jupyter-server-proxy is installed in server's environment

Provide a configuration option to Jupyter-dash so that it can know about existence of the Jupyter-server-proxy in server's environment

Alternative options

Option 1

Manually update some settings before running JupyterDash.infer_jupyter_proxy_config()

I've used a cell that looks like

app.default_requests_pathname_prefix = "user/<user name>/proxy/8050/"
app.default_server_url = "https://<jhub-server-url>"
app.server_url = "https://<jhub-server-url>"
app.infer_jupyter_proxy_config()

Option 2

Install a no-op package that has the same name in the kernel environment. I created a jupyter-server-proxy but without any contents, and installed it in the same kernel environment, so that jupyter-dash can know about its existence.

Suggest a solution

I think the import assumes that jupyter-server-proxy and jupyter-dash are running in the same python environment. It would be nice if we can provide the location of jupyter-server-proxy installation through configuration and jupyter-dash can do its check.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant