Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Haroune Mohammedi
    @mohammedi-haroune
    Is this expected? Is there any other configuration to limit the number of dashboards per user ?
    3 replies
    ping @danlester
    Axel Vanraes
    @axelv:matrix.org
    [m]
    Hi folks,
    I'm wondering if it is possible to skip the "Authorize Access" page when dashboard-viewers are opening a new dashboard?
    Does anyone have a pointer to which can help me further?
    4 replies
    alibama
    @alibama
    hey folks - my buddy got jupyterhub running, over here at kiss.codeforcville.org and here is our documentation thusfar https://github.com/code-for-charlottesville/OracleInfra/blob/main/Docs/Jupyterhub%20Setup.md
    now we want to set up containds = the truth is i'm not entirely certain what "spawner" we're using, or generally what my next steps are... this is the https://github.com/jupyterhub/jupyterhub-the-hard-way/ path my buddy started us on because i assume it allows for flexibility at this point, however a gentle nudge would be greatly appreciated :)
    3 replies
    alibama
    @alibama
    ok! we got streamlit apps running well - we're using the variable local spawner and that came together relatively fast
    now i'm getting the shiny app tools in there...
    not quite as confident, but looking good so far?
    Invalid application configuration.
    ENOTDIR: not a directory, scandir '/home/alibama/./test.r'.
    so that's the first error message on this shiny thing... i'm going to take a nap and look at it tomorrow... really excited about streamlit + jupyter notebooks running... it's a great looking product
    Dan Lester
    @danlester
    @alibama fantastic to hear you got as far as Streamlit running! Let us know if you're still struggling with Shiny after you've taken another look. Off the top of my head I can't remember exactly how you need to specify the 'presentation path' in Shiny - maybe it just wants the path to a folder, will look it up if you don't get further.
    alibama
    @alibama
    ok - back in the saddle = looking at shiny here... should i have an R kernel installed on jupyterhub?
    alibama
    @alibama
    i mean - i can create R files and add them to dashboards without it... but it would mean we could run code in browser more like r-studio, is that correct?
    Dan Lester
    @danlester
    You could install an R kernel for the JupyterLab session inside JupyterHub if that's what you mean, to run R code cell-by-cell in the JupyterLab notebook.
    alibama
    @alibama
    Hey! more good news = we got the rkernel running smoothly, however still having an issue connecting to the shiny dashboard
    alibama
    @alibama
    https://pastebin.com/9hEnkBUn ok - so i'm not authenticated is what it looks like?
    alibama
    @alibama
    also checked to makes sure - i do have a shiny-server running :)
    alibama
    @alibama
    also think i may have done something stupid = https://jupyterhub.readthedocs.io/en/stable/api/spawner.html#jupyterhub.spawner.LocalProcessSpawner.cmd should i be using a command here to initiate a conda environment inside of my personal server?
    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?