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

    I haven't tried it but maybe:

    c.Spawner.args = ['{--}Voila.tornado_settings="{{\'headers\':{{\'Content-Security-Policy\': \"frame-ancestors * self https://*.domain.name/\"}}}}"']

    but there might be more escaping needed in the ' and " or something yet!

    Let me know if this helps anyway.
    Sid Feygin
    @sfwatergit
    Thank you @danlester; I'll give the latter a go and see how it works. The more generalized solution (beyond Voila) will be useful, as we plan to use shiny as well. Would that be possible, or is it necessary to supply the parameters for each launcher type?
    Sid Feygin
    @sfwatergit

    Thanks so much! I was able to get this working. In fact less rather than more escaping was needed. The double quotes surrounding the dict needed to be removed else the tornado_settings are interpreted as a string (parsed to a list) rather than a dict.

    This fix frees me up to make progress with further exploratory work using voila. I'll get back in touch if I encounter problems with configuring rshiny.

    Sid Feygin
    @sfwatergit
    @danlester, actually, not quite... Now I'm getting No such file or directory: /home/jovyan/{--}Voila.tornado_settings={{'headers':{{'Content-Security-Policy': "frame-ancestors * self https:/*.domain.name/"}}}} when starting a (non-voila) notebook
    Dan Lester
    @danlester

    Makes sense - that's why you would need to solve this for Voila specifically rather than in c.Spawner.args.

    Instead of updating c.Spawner.args, try something like this:

    c.VariableMixin.extra_presentation_launchers = {
        'voila': {
                'args': ['--destport=0', 'python3', '{-}m','voila', '{presentation_path}',
                    '{--}port={port}',
                    '{--}no-browser',
                    '{--}Voila.base_url={base_url}/',
                    '{--}Voila.server_url=/',
                      '{--}Voila.tornado_settings={{\'headers\':{{\'Content-Security-Policy\': \"frame-ancestors * self https://*.domain.name/\"}}}}'
                     ]
        }
    }

    To construct this, I have borrowed the voila.args component of the cdsdashboards code here and just added your tornado_settings line.

    2 replies
    It will keep the other components of the code (cmd, extra_args_fn) for voila because you don't overwrite them.
    Ilya Trushchenko
    @white-hat

    Hi everyone! I'd like to override several Spawner parameters for dashboards only. Any clue how can I do that?
    when I do something like

          c.KubeSpawner.volumes = []
          c.KubeSpawner.volume_mounts = []

    it overrides both notebooks and dashboards, but I'm not sure how to override dashboards only

    5 replies
    Ilya Trushchenko
    @white-hat
    any ideas?
    frrrost
    @frrrost
    Hi there!
    I have a voila-dashboard where I'm trying to save some reports as XLSX files and then serve them to users. But after I click on download link, I get 403 error.
    I know, voila by default restricts access to local files. And it has special option to override this behavior: "VoilaConfiguration.file_whitelist". But I can’t see, how can I provide this option through jupyterhub_config.py.
    Could anyone share some advice?
    5 replies
    Sid Feygin
    @sfwatergit

    Hi Dan,

    I'm planning on using the query string approach to parameterize our voila dashboards by passing in the query parameters to run database calls for dashboards belonging to the authenticated username where authorization to run the calls is enabled if the user belongs to the customer group that owns the data targeted by the query.

    The one missing piece here is that it would be useful for the page calling into the iframe containing the dashboard to find out the dashboards available to the user. How can this be done?

    13 replies
    sake4567
    @sake4567
    Hi There,
    We have installed cdsdashboard on jupyter-notebook as well as on jupyterhub but can't see any dashboard option displayed in jupyterhub. Any idea what could be the issue?
    Jupyterhub Installed version: 1.0.0
    python 3.8
    1 reply
    Robert Seidl
    @seidlr
    Hi, is there an easy way to share some dashboards that are hosted on the server publicly without necessary login?
    2 replies
    Haroune Mohammedi
    @mohammedi-haroune
    Hi, I have created my first dashboard with ContainDS but it's redirecting me to a jupyterlab application not voilà
    Haroune Mohammedi
    @mohammedi-haroune
    I've also tried streamlit without success, same behaviour: a JupyterLab app in deployed not streamlit.
    1 reply
    Haroune Mohammedi
    @mohammedi-haroune:matrix.org
    [m]
    Thanks, Yes, you were right. I had to made my custom KubeSpawner inhering from your VariableKubeSpawner and it's working now.
    1 reply
    Haroune Mohammedi
    @mohammedi-haroune
    hello, named_server_limit_per_user is not affecting the maxium number of dashboards per user
    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