Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dan Lester
    @danlester
    It would be good to see if you can get at the logs (perhaps from the jupyterhub process itself if nothing is displayed on the web page when it breaks), and/or possibly logs from the JupyterLab/Dashboard container while it is alive (but in DockerSpawner it is only available for 30s).
    alibama
    @alibama
    well i got tired of figuring things out about a week ago and installed tljh... everything is working fine now
    xeliba
    @xeliba

    Hi all! We really like the ContainDS dashboard extensions to JupyterHub. Works very well in our Azure Kubernetes deployment. Big thank you to the authors!
    At the moment we have just one more requirement left, which is "Sharing JupyterLab servers" between teams. Dashboards are already designed to be accessible to a JupyterHub group of users. One approach to share JupyterLab servers could be to simply spawn the JupyterLab in the same way as you would spawn a dashboard server.
    I tried to do that with a a custom launcher, like this:

    c.VariableMixin.extra_presentation_launchers = {
             'shared_jupyter': {
                 'env': {
                     'JUPYTERHUB_SERVICE_PREFIX': '/user/<username>/dash-shared-jupyter',
                 },
                 'args': ['jupyter', 'lab', '{--}no-browser','{--}ServerApp.token=\'\'','{--}ServerApp.base_url=\'\'', '{--}ip=0.0.0.0', '{--}port={port}'],
                 'debug_args': [],
             }
          }

    It did not really work, probably because I did not quite hit the right configuration for "ServerApp.base_url" and "JUPYTERHUB_SERVICE_PREFIX". Maybe one of you has an idea, how to configure such a "shared_jupyter_server" launcher.

    4 replies
    GridSof
    @SofianeB

    I have allowed a User 1 to see my dashboard but I see:

    tornado.web.HTTPError: HTTP 403: Forbidden (user User 1 is not allowed.)

    Do you have an idea?

    6 replies
    Tomasz Eliasinski
    @aepurniet_gitlab
    QQ: Is there a way to create a dashboard referencing a local file through a REST API?
    Tomasz Eliasinski
    @aepurniet_gitlab
    is there a dashboard specific REST API?
    2 replies
    GuySerfaty
    @GuySerfaty
    Hey all ! After upgrading to 0.6.0 I'm seeing: ModuleNotFoundError: No module named 'jhsingle_native_proxy' on voila dashboard. any idea? I'm using z2jh, I checked the image that created with the dashboard pod is the same like the single-user and it looks like it have jhsingle-native-proxy>=0.7.6
    1 reply
    Victor Behar
    @victor_wayward_twitter
    Greetings all! With the latest jupyterhub-lab I am trying to create a Voila dashboard and share it. I get a forbidden 403 error when the involved users are normal users and everything works as expected when the users sharing the dashboard are admins. I suspect this is related to the newly introduced roles and scopes. Please advise on how to overcome this, what are the required permissions that should be granted? Thank you.
    Geri Wolters
    @GeriWolters
    I'm running in the same problem that @victor_wayward_twitter has. It also applies to Dash dashboards. My configuration involves a modified Generic OAuthenticator that creates local accounts. Only admins seem to be able to access shared dashboards. The log shows: User ... not allowed to access Server at ...
    A trace with some information blanked:
    HTTPServerRequest(protocol='https', host='(blanked)', method='GET', uri='/user/(blanked)/dash-sincos/', version='HTTP/1.1', remote_ip='(blanked')
    Traceback (most recent call last):
    File "/usr/local/lib/python3.9/dist-packages/tornado/web.py", line 1704, in _execute
    result = await result
    File "/usr/local/lib/python3.9/dist-packages/jhsingle_native_proxy/websocket.py", line 102, in get
    return await self.http_get(args, *kwargs)
    File "/usr/local/lib/python3.9/dist-packages/jhsingle_native_proxy/proxyhandlers.py", line 849, in http_get
    return await self.proxy(self.port, path)
    File "/usr/local/lib/python3.9/dist-packages/jhsingle_native_proxy/proxyhandlers.py", line 843, in proxy
    return await self.oauth_proxy(port, path)
    TypeError: object NoneType can't be used in 'await' expression
    Just prior to that trace, tornado has some warnings:
    WARNING:tornado.application:No Hub user identified for request
    WARNING:tornado.application:Token stored in cookie may have expired
    WARNING:tornado.application:Detected unused OAuth state cookies
    Victor Behar
    @victor_wayward_twitter
    Here is what you need:
    # cdsdashboards role
    c.JupyterHub.load_roles = [{
    "name": "cdsdashboards",
    "description": "access servers",
    "scopes": ["access:servers"],
    'users': ['victor']
    }]
    Geri Wolters
    @GeriWolters
    Nice. That works! Thanks! Now my problem is how to add users to the 'users' automatically... Is there a way to specify a group instead of individual users?
    Basically, I want all registered users to be able to use those dashboards. Currently, I add all users to a specific Linux group.
    Geri Wolters
    @GeriWolters
    I think I found how: by adding a user to the user_role_map table in the back-end database for the role cdsdashboards.
    Victor Behar
    @victor_wayward_twitter
    I think groups are supported, I would expect you can assign roles to groups
    Geri Wolters
    @GeriWolters
    Yes, I did so. I used PostAuthHook to add the user to the default group that is allowed for the csdsdashboards role. Works nicely. Thanks for the advice!
    1 reply
    jlben
    @BTamby
    Hello,
    I am installing ContainDS on an ubuntu 18.04 server with my JupyterHub in basic installation. I am using the default PAM authenticator. I followed the ContainDS installation documentation (https://cdsdashboards.readthedocs.io/en/stable/index.html) but I have a problem as soon as I connect to my Jupyterhub I have a 404 error : Not Found
    You are requesting a page that does not exist!
    Dashboards ultimately lead to a 404 not found error, as do any named servers that you create directly using the standard JupyterHub home page table.
    I'm not sure if the fix for TLJH is also applicable to a JupyterHub server installed from scratch. Could you help me solve this problem.
    Thank you in advance for your help.
    Jean-Luc
    Geri Wolters
    @GeriWolters
    Here is my configuration, at least the relevant parts, I believe. This is also a clean setup, no TLJH fixes. I left the authentication part out, as mine is OAuth. I hope it helps.

    c.CDSDashboardsConfig.builder_class = 'cdsdashboards.builder.processbuilder.ProcessBuilder'
    c.CDSDashboardsConfig.spawn_allow_group = '(blanked)'
    c.CDSDashboardsConfig.presentation_types = ['plotlydash', 'voila']

    from cdsdashboards.app import CDS_TEMPLATE_PATHS_RESTRICTED
    from cdsdashboards.hubextension import cds_extra_handlers

    c.JupyterHub.template_paths = CDS_TEMPLATE_PATHS_RESTRICTED
    c.JupyterHub.extra_handlers = cds_extra_handlers
    c.JupyterHub.admin_users = set(["(blanked)", "(blanked)"])
    c.JupyterHub.spawner_class = 'cdsdashboards.hubextension.spawners.VariableLocalProcessSpawner'
    c.JupyterHub.redirect_to_server = False
    c.JupyterHub.default_url = '/hub/dashboards'

    cdsdashboards role

    c.JupyterHub.load_roles = [{
    "name": "cdsdashboards",
    "description": "access servers",
    "scopes": ["access:servers"],
    "groups": ["default"]
    }]

    c.JupyterHub.data_files_path = '/etc/jupyterhub/templates/jupyterhub'

    Ray Bell
    @raybellwaves
    Hi all. Trying this for the first time on tljh. Current following the config in the docs but once I reload the config I get a "bad gateway". I created an issue on this ideonate/cdsdashboards#91
    1 reply
    Robert Seidl
    @seidlr
    Hi, whats the best way to serve a static website as dashboard with python. A custom launcher that uses http.server module or is there something more obvious that I am missing?
    rey abe
    @reyabe_twitter
    I tried the above suggestion to add the "access:servers" scope to the user's or group's role, but I found that any user who has a role with that scope can access all other users' notebook servers as well, which basically voids all access control. Am I missing something?
    shubham kanwal
    @shubhamkanwal
    image.png

    Hi, i am trying to install cds dashboards via my custom docker file, i am using ideonate/cdsdashboards-jupyter-k8s-hub for hub and for single user i am building on top of docker stacks .

    So when i create new dashboard i get the following error message - i have tried creating for voila and plotly dash so far.

    My docker file - using this for reference- https://github.com/ideonate/cdsdashboards/blob/master/docker-images/singleuser-example/containds-all-example/Dockerfile

    FROM jupyter/minimal-notebook

    USER root

    ENV JUPYTER_CONFIG_DIR /jupyter/.jupyter
    ENV JUPYTER_DATA_DIR /jupyter/.local/share/jupyter
    ENV JUPYTER_RUNTIME_DIR /jupyter/.local/share/jupyter/runtime

    ##############################CDS

    RUN conda config --set ssl_verify no
    RUN conda install --quiet --yes -c conda-forge git

    RUN rm -rf /home/jovyan/work

    Effectively we just want to run

    RUN pip install cdsdashboards[user]

    But we often build the docker image before the cdsdashboards release to pypi

    so just pick the bits we need:

    ARG JHSINGLENATIVEPROXY_LINE=jhsingle-native-proxy>=0.6.1

    RUN pip install $JHSINGLENATIVEPROXY_LINE plotlydash-tornado-cmd>=0.0.4 bokeh-root-cmd>=0.1.2 rshiny-server-cmd>=0.0.2 voila-materialstream>=0.2.6

    Install the frameworks

    ARG FRAMEWORKS_LINE="voila streamlit dash bokeh panel holoviews"

    RUN pip install $FRAMEWORKS_LINE

    USER $NB_UID
    COPY jupyter_notebook_config_extra.py /etc/jupyter/
    RUN cat /etc/jupyter/jupyter_notebook_config_extra.py >> /etc/jupyter/jupyter_notebook_config.py
    RUN rm /etc/jupyter/jupyter_notebook_config_extra.py

    COPY voila.json /etc/jupyter

    Enable local conda envs

    RUN conda init bash

    Fix permissions on /etc/jupyter as root

    USER root
    RUN fix-permissions /etc/jupyter/

    #

    make sure the directories exist

    USER root

    RUN mkdir -p $JUPYTER_CONFIG_DIR
    RUN mkdir -p $JUPYTER_DATA_DIR
    RUN mkdir -p $JUPYTER_RUNTIME_DIR

    RUN pip install jupyter_contrib_nbextensions \
    && pip install jupyterhub==1.5 \
    && pip install --upgrade cdsdashboards==0.6.0 \
    && jupyter contrib nbextension install --system \
    && pip install jupyter_nbextensions_configurator \
    && jupyter nbextensions_configurator enable --system \
    && pip install yapf # for code pretty

    RUN chmod -R 777 /jupyter

    USER $NB_UID

    I am running jupyterhub on EKS cluster. Hub configurations-

    hub:
    allowNamedServers: true
    image:
    name: ideonate/cdsdashboards-jupyter-k8s-hub
    tag: 1.1.3-0.6.0
    extraConfig:
    cds-handlers: |
    from cdsdashboards.hubextension import cds_extra_handlers
    c.JupyterHub.extra_handlers = cds_extra_handlers
    cds-templates: |
    from cdsdashboards.app import CDS_TEMPLATE_PATHS
    c.JupyterHub.template_paths = CDS_TEMPLATE_PATHS
    cds-kube: |
    c.JupyterHub.spawner_class = 'cdsdashboards.hubextension.spawners.variablekube.VariableKubeSpawner'
    c.CDSDashboardsConfig.builder_class = 'cdsdashboards.builder.kubebuilder.KubeBuilder'

    Yann Sartori
    @yannsartori
    I am having the same issue as @reyabe_twitter. Ideally, I would like users to be able to start any containds dashboard server, but not be able to start, nor access normal notebook servers. With the current configuration, users cannot start others' notebook servers, but can access them if they are already running, albeit by going directly to the URL.
    2 replies
    Yashali Bansod
    @yashali

    @danlester Hi, thanks for creating ContainDS Dashboards! It caters to a loooot of our use cases. However I am unable to get it running on our current setup :/ We are on Kubernetes (Z2JH). So on our custom jhub_k8s image I installed cdsdashboards>=0.4.0. Further, on our custom singleuser image, we need all kinds of dashboards. So I have added

    RUN pip install streamlit
    
    RUN conda install dash=1.16.0 && pip install  'plotlydash-tornado-cmd>=0.0.6'
    
    RUN pip install bokeh panel 'bokeh-root-cmd>=0.0.5'

    (dash=1.16.0 because it conflicted with a few already installed pkgs)

    Since we use custom single user image:-
    Added : "c.VoilaConfiguration.enable_nbextensions=True" to the already existing /etc/jupyter/jupyter_notebook_config.py file in the singleuser image. Added /etc/jupyter/voila.json (containing {}) to this image. Also, added this to the single user image
    pip install 'jhsingle-native-proxy>=0.7.6' 'voila-materialstream>=0.4.0' jupyter-containds
    Added extra configs to the helm values.yml : https://cdsdashboards.readthedocs.io/en/stable/chapters/setup/z2jh.html#config-yaml

    Rest all lines in the Dockerfile was already present in our single-user custom image since we build our image based on the docker-stacks image as well.

    Is there nothing else to be done on hub apart from installing cdsdashboards>=0.4.0?
    I see a CDSDashboard Menu item after logging into my named server notebook on jhub. But the extension itself doesnt show the buttons ib the launcher. Neither doest the 'Dashboards' tab appear on hub.

    What did I miss?

    4 replies
    Yashali Bansod
    @yashali
    Hi @danlester , I was wondering if there is way to automatically refresh a dashboard server , if it's corresponding streamlit_app.py file changes. If not, it would be great if you could point me in the direction where I will be able to implement something like this
    ravienggtoo
    @ravienggtoo:matrix.org
    [m]

    Hi @danlester I am trying to create a new custom conda env while creating Dashboard. But dashboard gives me following error .

    I am running jupyterhub via helm and have included c.CDSDashboardsConfig.allow_custom_conda_env = True config too

    ravienggtoo
    @ravienggtoo:matrix.org
    [m]

    :point_up: Edit: Hi @danlester I am trying to create a new custom conda env while creating Dashboard. But dashboard gives me following error .

    I am running jupyterhub via helm and have included c.CDSDashboardsConfig.allow_custom_conda_env = True config.

    Yashali Bansod
    @yashali
    @ravienggtoo If your /opt/conda/env directory is within in the docker image, this doensnt work. In such a case, the conda env you created on notebook server would be on the notebook server and not on the dashboard server. You will have to create the conda env on a shared mount, if you want both notebook server and dashboard servers to access it
    Yashali Bansod
    @yashali
    @DarkmatterVale @danlester Please help me understand how to fix this error:
    Execute the command: python3 -m jhsingle_native_proxy.main --destport=0 streamlit {--}log_level=debug run {presentation_path} {--}server.port={port} {--}server.headless=True {--}browser.serverAddress={origin_host} {--}browser.gatherUsageStats=false --presentation-path=./stream3.py --ip=0.0.0.0 --port=8888 --debug --request-timeout=240 --no-force-alive --last-activity-interval=600
    INFO:tornado.application:SuperviseAndProxyHandler http_get 53279
    DEBUG:tornado.application:No user identified
    DEBUG:tornado.application:Redirecting to login url: /xyz/hub/api/oauth2/authorize?client_id=jupyterhub-user-myusername-cdsdash-protobuf-1&redirect_uri=%2Fxyz%2Fuser%2Fmyusername%2F-cdsdash-protobuf-1%2Foauth_callback&response_type=code&state=eyJ1dWlkIjogImEzZjdjNjkwOGY2YzQwYmI4OTRhNWU1M2JkNTg1OGE5IiwgIm5leHRfdXJsIjogIi9vdHcvdXNlci9iYW5zeWFzL21zY2ktY2RzZGFzaC1wcm90b2J1Zi0xLyJ9
    ERROR:tornado.application:Uncaught exception GET /xyz/user/myusername/cdsdash-protobuf-1/ (172.16.5.187)
    HTTPServerRequest(protocol='http', host='172.16.5.195:8888', method='GET', uri='/xyz/user/myusername/cdsdash-protobuf-1/', version='HTTP/1.1', remote_ip='172.16.5.187')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.8/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/opt/conda/lib/python3.8/site-packages/jhsingle_native_proxy/websocket.py", line 102, in get
        return await self.http_get(*args, **kwargs)
      File "/opt/conda/lib/python3.8/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 849, in http_get
        return await self.proxy(self.port, path)
      File "/opt/conda/lib/python3.8/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 843, in proxy
        return await self.oauth_proxy(port, path)
    TypeError: object NoneType can't be used in 'await' expression
    michael-borck
    @michael-borck
    Hi, thanks for ContainsDS. My use case is to share dashboards with students and staff. I am doing a default installation of ContainDS and TLJH on Ubuntu 18.04 (VPS). We use GitHub OAuth, Jupyter lab/tree environments work, accessed via the FQDN. I can create dashboards but have spawn problems. Trying the example sin-cos, I get the following error: "Spawn failed: Server at http://127.0.0.1:33759/user/michael-borck/dash-sin-and-cos/ didn't respond in 30 seconds". It seems to spawn but can't connect. No idea where to start looking to configure/fix. Is 127.0.0.1 the issue? Any pointers would be appreciated.
    michael-borck
    @michael-borck
    Ignore my query above. It looks like it was a user error, doh! I reinstalled everything, and it is now working as advertised. I must have missed a step earlier. Sorry for the noise.
    alibama
    @alibama
    i'm getting an issue "/opt/tljh/hub/lib/python3.6/site-packages/urllib3/connectionpool.py:1052: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings" even though the site seems to be working
    i'm using tljh and getting what looks like some issues that other folks have found
    but not getting it resolved
    i'm on digital ocean, not sure if that's a clue
    alibama
    @alibama
    if i remove the containds spawn info and such it gives me the same error twice but then starts working
    spapa013
    @spapa013
    hello, any idea when jupter-containds will support ipywidgets > 8.0.0
    jupyter-containds 0.2.2 requires ipywidgets<8.0.0,>=7.6.0, but you have ipywidgets 8.0.1 which is incompatible
    alibama
    @alibama
    got things working on ubuntu 20.04 (had been on 18.04)
    Julio D. Raffo🇧🇷🇦🇷
    @raffojulio_twitter
    I'm getting an issue with the streamlit dashboard in TLJH running on an AWS EC2. When started it gets stuck on "Please wait...". Here https://docs.streamlit.io/knowledge-base/deploy/remote-start they recommend trying to turn off Cors or websocket compression. However I cannot make it work in the c.VariableMixin.extra_presentation_launchers . Any hint on how can I try to disable these?
    1 reply
    alibama
    @alibama

    @danlester

    server.enableCORS=false needs to be enabled for streamlit

    "
    c.VariableMixin.extra_presentation_launchers = {
    'streamlit': {
    'env': {'JUPYTERHUB_COOKIE_OPTIONS': '{"SameSite": "None", "Secure": true}'}
    }
    }
    "
    any thoughts on passing this flag to streamlit?

    Nathan Lloyd
    @supern8ent
    Can anyone recommend how to get secrets to a kubernetes+jupyterhub+containerds dashboard?