Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    alibama
    @alibama
    i'm not finding it simple to install libraries in my notebook.... this may be outside the scope of discussion here though
    alibama
    @alibama
    makes me wonder whether i want to switch over to a docker spawner also? any thoughts on that / how much work is that really?
    Dan Lester
    @danlester

    In your pastebin logs, maybe r shiny-server is installed as root, or just not able to run as the user inside your dashboard anyway. I think this is at a filesystem level, not in terms of auth into JupyterHub.

    For Conda environments, you can specify a non-default one here: https://cdsdashboards.readthedocs.io/en/stable/chapters/customization/huboptions.html#conda-environments

    DockerSpawner perhaps has the advantage that you can use pre-created images, but then modifying them for your own purposes might be harder...

    For more general JupyterHub questions you might find a wider range of experience on the forum here: https://discourse.jupyter.org/

    alibama
    @alibama
    so streamlit works great when the blank conda environment is selected... but borks - spawner won't start - when using any custom conda environment - i went through the instructions here since we're in an oauth nginx localspawn JH
    but that didn's seem to change much? although i did appreciate that line drawing to explain where the headers were coming from....
    Dan Lester
    @danlester
    I don't think that issue has much to do with conda envs, but the line drawing is definitely good (as is his animated png screenshot).
    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
    SB
    @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