Re: [jupyter] Jupyterhub and motd/nologin/alerts?

2020-09-01 Thread 'Michael Milligan' via Project Jupyter
Hello -

On Tue, Sep 1, 2020 at 10:16 AM Norman Gray  wrote:

>
> Michael, hello.
>
> On 1 Sep 2020, at 15:27, 'Michael Milligan' via Project Jupyter wrote:
>
> > It sounds like you want
> > https://github.com/rcthomas/jupyterhub-announcement
> >
> > That plugin is developed and used at NERSC to do communication with
> > their
> > users in much the way you describe. We should probably do something
> > about
> > making it more discoverable.
>
> That's very useful -- thanks -- and seems to do exactly what's required
> in terms of announcements.
>
> For the benefit of those users who _will not read_, is there any way of
> inhibiting logins, or of either communicating with them (in the sense of
> 'we're rebooting -- go out for a walk!') or booting them off in a
> controlled way?
>
>
It is straightforward to stop user sessions from the Jupyterhub admin page.
I'm not aware of a "nologin" type solution, but it sounds simple enough
that someone has probably implemented one.

Unfortunately the weak link here is communicating with users who are
already in running sessions. Jupyterhub can't easily help there, as by that
time the user experience is under the control of the notebook server,
jupyterlab, or whatever frontend they happen to be using. So your solution
will depend on what your users are actually doing. I'd also be curious to
know if others in this forum have solutions for that.


> Best wishes,
>
> Norman
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/BBF672DE-A262-4B1E-A167-0D58BB561725%40gmail.com
> .
>


-- 
Michael Milligan, Ph.D.| Supercomputing Institute
Assistant Director for | University of Minnesota
   Application Development | milli...@umn.edu
he/him/his | www.msi.umn.edu

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gqeLLv-VUpJc9LKJCd9zQHR6pMs61iBNfAWLT-3gJUBfw%40mail.gmail.com.


Re: [jupyter] Jupyterhub and motd/nologin/alerts?

2020-09-01 Thread 'Michael Milligan' via Project Jupyter
It sounds like you want https://github.com/rcthomas/jupyterhub-announcement

That plugin is developed and used at NERSC to do communication with their
users in much the way you describe. We should probably do something about
making it more discoverable.

On Tue, Sep 1, 2020 at 9:13 AM Norman Gray  wrote:

>
> Greetings.
>
> Is there any jupyterhub equivalent of motd, or nologin, or alerts,
> available on Jupyterhuh?  I feel sure there must be, but I can't find
> anything relevant either in the docs or via searches.
>
> When planning for server downtime, it's useful to be able to warn users
> of the forthcoming downtime with some sort of motd-equivalent, then stop
> people connecting in the period running up to the shutdown, and to alert
> them -- in a 'hey, you!' way -- if they're still connected come shutdown
> time.
>
> I can see it's possible in principle to fiddle with the login screen for
> the motd, but that seems rather hacky.
>
> What am I missing?
>
> Best wishes,
>
> Norman
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/6E9FB33D-BAF3-48C9-AE5C-8D085CD2F5EE%40gmail.com
> .
>


-- 
Michael Milligan, Ph.D.| Supercomputing Institute
Assistant Director for | University of Minnesota
   Application Development | milli...@umn.edu
he/him/his | www.msi.umn.edu

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8grR6OVELE_42MZz%3DxVfgUfvozur8Dpbk5CYY4MmP0923Q%40mail.gmail.com.


Re: [jupyter] Reviving the all-Jupyter video call

2019-02-27 Thread Michael Milligan
implementation of some Jupyter project.
>3. A member of the Jupyter steering council share any
>updates/announcements that the community should here.
>
>
> More specific discussion about sub-organizations/sub-projects should
> happen in their own Team meetings separate from this all-Jupyter meeting
> (i.e. nteract, jupyterlab, and jupyterhub all have their own separate
> meetings).
>
> Who are we targeting with these calls?
>>
>
> This call targets both Jupyter *developers* and *users*. Jupyter
> developers get to hear about other projects in the Jupyter ecosystem, offer
> technical feedback, and guard against problems that arise from a lack of
> communication. Jupyter users can hear about awesome things happening in the
> Jupyter ecosystem, ask questions in real-time, and share their experiences
> with the various sub-projects.
>
> Who should attend these calls?
>>
>
> First, it's absolutely critical that most of the core Jupyter developers
> participate in some capacity. Whether that's preparing demos or speaking on
> the video call, having core developers attend demonstrates that we are
> invested in the team and the community.
>
> After that, *anyone and everyone* is welcome! Whether it's to present
> their work, engage in discussion, or just sit in and listen, everyone is
> welcome. This is a good chance for users to ask questions and meet other
> Jupyter people.
>
> What should the format be?
>>
>
> *(We will likely need to iterate on the format. This thread is a good
> place to discuss and collection ideas for a format.)*
>
> One initial idea is to follow a format similar to Jupyterhub/Binder
> meetings:
>
> Meeting Agenda:
>
>- The agenda is open and editable by anyone via HackMD.
>- Users/developers "sign-in" and add agenda items.
>- Two types of agenda items:
>   - Shout-outs/highlights that don't require any discussion
>   - Demos showing a project, extension, etc. by screen sharing
>- Items can be added up-to 24 hours before the call.
>- We'll send out multiple reminders about agenda+meeting (a month
>before, a week before, and two days before) on Github, Gitter, Twitter, 
> etc.
>- We'll organize the agenda items the day before the meeting.
>- Notes/minutes will be added under each agenda item as the meeting is
>taking place.
>- After the meeting ends, the moderator will publish the agenda+notes
>(somewhere... still up for discussion).
>
>
> Video call:
>
>- Call once a month (last Tuesday each month).
>- Call is recorded.
>- Call moderator leads group through the agenda (I, Zach, will lead
>the first call).
>- The moderator reads through the "shout-outs and highlights" section
>(no discussion to follow).
>- The author of each agenda item leads their demo.
>- A demo should be short (~5-7 minutes). Think of it as a "flash
>talk". This isn't meant to be a burden that requires tons of preparation.
>- After each demo, the moderator opens the floor for
>questions/discussion.
>- After all demos, a member of the steering council makes any further
>announcements/updates relevant to the whole team.
>- Call ends, and moderator publishes it in the Jupyter YouTube channel.
>
>
> I would also suggest we create a "team-compass" page for all-Jupyter (like
> Jupyterhub's team-compass page
> <https://github.com/jupyterhub/team-compass>), but that's a separate
> discussion.
>
> *What's next?*
>
> Our first meeting with this new format will be at 9am PST (your timezone
> <http://arewemeetingyet.com/Los%20Angeles/2019-03-26/09:00/Jupyter%20Team%20Meeting>)
> on Tuesday, March 26th, 2019.
>
> I've created an initial agenda
> <https://hackmd.io/5WDMIAOjQx-SZe4_RP6wrg?both> on HackMD.
>
> Let's use this thread to discuss. If anyone has an opinion or idea for
> these meetings, share them here. I just ask that we respect each other's
> opinions and recognize that it's extremely difficult to create a meeting
> that fits everyone's goals. We'd love everyone's participation (and
> patience) as we improve these video calls. :)
>
> I look forward to seeing you on March 26th!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/baf02c1d-57c7-4bd1-8a07-54dab0c9a4e5%40googlegroups.com
> <https://

Re: [jupyter] Setting up JupyterHub with HTCondor batchspawner

2018-11-09 Thread Michael Milligan
Hi Nikita,

This question will get a better response as an issue at the batchspawner
GitHub repo: https://github.com/jupyterhub/batchspawner/issues

If you create an issue report there with this information, the appropriate
developers (including myself) will see it and give you a response as soon
as they are able.

Thanks,
Michael


On Fri, Nov 9, 2018, 8:54 AM Nikita Balashov  Hi,
>
> I'm trying to make batchspawner work with HTCondor but I'm stuck with the
> following error:
>
> [I 2018-11-09 13:35:39.816 JupyterHub batchspawner:242] Spawner
> submitting job using sudo -i -u testuser condor_submit
> [I 2018-11-09 13:35:39.816 JupyterHub batchspawner:243] Spawner submitted
> script:
>
> Executable = /bin/sh
> RequestMemory = 4gb
> RequestCpus = 1
> Arguments = "-c 'exec batchspawner-singleuser --ip=""0.0.0.0""'"
> Remote_Initialdir = /home/testuser
> Output = /home/testuser/.jupyterhub.condor.out
> Error = /home/testuser/.jupyterhub.condor.err
> ShouldTransferFiles = False
> GetEnv = True
> Universe = vanilla
> Queue
>
> [I 2018-11-09 13:35:40.119 JupyterHub batchspawner:246] Job submitted. cmd
> : sudo -i -u testuser condor_submit output: Submitting job(s).
> 1 job(s) submitted to cluster 19.
> [D 2018-11-09 13:35:40.120 JupyterHub batchspawner:269] Spawner querying
> job: sudo -i -u testuser condor_q 19 -format "%s, " JobStatus -format "%s,
> " RemoteHost -format "
> " True
> [E 2018-11-09 13:35:40.356 JupyterHub batchspawner:215] Subprocess
> returned exitcode 1
> [E 2018-11-09 13:35:40.357 JupyterHub batchspawner:216] Stdout:
> [E 2018-11-09 13:35:40.357 JupyterHub batchspawner:217] b''
> [E 2018-11-09 13:35:40.357 JupyterHub batchspawner:218] Stderr:
> [E 2018-11-09 13:35:40.357 JupyterHub batchspawner:219] Error: -format
> requires format and attribute parameters
> [E 2018-11-09 13:35:40.357 JupyterHub batchspawner:274] Error querying
> job 19
> [W 2018-11-09 13:35:40.358 JupyterHub batchspawner:372] Job  neither
> pending nor running.
>
> [E 2018-11-09 13:35:40.359 JupyterHub user:477] Unhandled error starting
> testuser's server: The Jupyter batch job has disappeared while pending in
> the queue or died immediately after starting.
> [D 2018-11-09 13:35:40.373 JupyterHub user:578] Deleting oauth client
> jupyterhub-user-testuser
> [E 2018-11-09 13:35:40.410 JupyterHub web:1670] Uncaught exception GET
> /hub/user/testuser/ (159.93.40.25)
> HTTPServerRequest(protocol='http', host='jupyterhub.jinr.ru', method='
> GET', uri='/hub/user/testuser/', version='HTTP/1.1', remote_ip='159.93.
> 40.25')
> Traceback (most recent call last):
>   File
> "/usr/share/anaconda3/lib/python3.7/site-packages/tornado/web.py", line
> 1592, in _execute
> result = yield result
>   File
> "/usr/share/anaconda3/lib/python3.7/site-packages/jupyterhub/handlers/base.py",
> line 1052, in get
> await self.spawn_single_user(user)
>   File
> "/usr/share/anaconda3/lib/python3.7/site-packages/jupyterhub/handlers/base.py",
> line 705, in spawn_single_user
> timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future
>   File
> "/usr/share/anaconda3/lib/python3.7/site-packages/jupyterhub/handlers/base.py",
> line 626, in finish_user_spawn
> await spawn_future
>   File
> "/usr/share/anaconda3/lib/python3.7/site-packages/jupyterhub/user.py", line
> 489, in spawn
> raise e
>   File
> "/usr/share/anaconda3/lib/python3.7/site-packages/jupyterhub/user.py", line
> 409, in spawn
> url = await
> gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
>   File
> "/usr/share/anaconda3/lib/python3.7/site-packages/batchspawner/batchspawner.py",
> line 373, in start
> raise RuntimeError('The Jupyter batch job has disappeared'
> RuntimeError: The Jupyter batch job has disappeared while pending in
> the queue or died immediately after starting.
>
> The condor_q command succeeds if ran manually:
> # sudo -i -u testuser condor_q 19 -format "%s, " JobStatus -format "%s, "
> RemoteHost -format "\n" True
> 1,
>
> # echo $?
> 0
>
> I'm using the latest batchspawner (from the master):
> # pip list |grep batchspawner
> batchspawner   0.9.0.dev0
>
> And the spawner configuration:
> c.JupyterHub.spawner_class = 'batchspawner.CondorSpawner'
> c.Spawner.http_timeout = 120
>
> c.BatchSpawnerBase.req_nprocs = '1'
> c.BatchSpawnerBase.req_memory = '1gb'
> c.BatchSpawnerBase.req_runtime = '12:00:00'
>
> c.CondorSpawner.exec_prefix = 'sudo -i -u {username}'
>
> What can be the cause of this error?
>
> Thanks,
> Nikita Balashov
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit
> 

Re: [jupyter] How to design JupyterLab extension that reacts to pandas function calls

2018-09-18 Thread Michael Milligan
FYI you might take a look at the Jupyterlab variable inspector work being
tracked here: https://github.com/jupyterlab/jupyterlab/issues/443

Seems like there could be some overlap with what you are trying to do.

Cheers,
Michael

On Mon, Sep 17, 2018 at 7:42 PM, Adam Rule  wrote:

> Great point Brian. For prototyping's sake monkey patching should be enough
> to test if the interaction is valuable or not.
>
>
> On Monday, September 17, 2018 at 4:45:19 PM UTC-7, ellisonbg wrote:
>>
>> I think it could be regular python code that uses the Jupyter display
>> system to display the information. The challenge is to figure out how to
>> detect the pandas function calls and add the needed logic before and after.
>> A good starting point might be to just monkey patch the relevant pandas
>> calls and wrap them in the logic you need. That would allow you to get
>> started quickly and explore the problem space.
>>
>> On Mon, Sep 17, 2018 at 3:40 PM Adam Rule  wrote:
>>
>>> I have noticed that a number of Jupyter users call df.head(), df.shape,
>>> df.describe(), or something similar almost every time they load or
>>> manipulate a dataframe to inspect what their manipulation did. I would like
>>> to develop an extension or kernel magic that prints useful information to a
>>> cell's output based on the pandas function called in that cell. For
>>> example, running pd.read_csv() might automatically print the shape and
>>> column names of the loaded dataframe and df.drop_duplicates() might
>>> automatically print how many duplicates were dropped and how many unique
>>> rows remain.
>>>
>>> How might I architect such an extension (e.g., a JupyterLab extension,
>>> an iPython kernel magic, or something else)? I think I would need to detect
>>> when certain pandas functions are about to be run by the kernel and gather
>>> information about the dataframe immediately before and after execution.
>>> Would that even be feasible?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Project Jupyter" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jupyter+u...@googlegroups.com.
>>> To post to this group, send email to jup...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jupyter/9e1dfb92-87e0-4a8b-b170-370ab7cfabc7%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jupyter/9e1dfb92-87e0-4a8b-b170-370ab7cfabc7%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Brian E. Granger
>> Associate Professor of Physics and Data Science
>> Cal Poly State University, San Luis Obispo
>> @ellisonbg on Twitter and GitHub
>> bgra...@calpoly.edu and elli...@gmail.com
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/69c48c2c-2c9f-4ce1-8491-5c98399eb8ff%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/69c48c2c-2c9f-4ce1-8491-5c98399eb8ff%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael Milligan, Ph.D. | Supercomputing Institute
Assistant Director for  | University of Minnesota
   Application Development  | milli...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gpXtbZAyBLTncUg7Mf-f%2BERcapDnLxNC_OAb2fR%2B%2BAUqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Embedding Jupyter in web app

2018-08-05 Thread Michael Milligan
Incidentally, you should know that tmpnb is deprecated - the recommended
path forward would be BinderHub (which is basically Jupyterhub+Kubernetes),
but using Jupyterhub with the tmpauthenticator plugin would also be an
option.

See README here: https://github.com/jupyter/tmpnb

Although it sounded like the original poster really just wanted to run
nbconvert behind a web app.


On Wed, Jul 18, 2018 at 1:23 AM,  wrote:

> Hi Phil,
>
> Did you succeed on this? Can you share a template or something?
>
> On Tuesday, April 11, 2017 at 6:04:48 PM UTC+2, Philip Matheson wrote:
>>
>> Thank you Thomas this helped a lot. I don't think I need a whole new
>> interface but I found a reference to tmpnb on that page which got me
>> wondering, should use that instead of JupyterHub?
>>
>> My use case will be pretty simple . Users will login to an existing
>> website where they have a profile. Part of that profile will be a list of
>> notebooks they have created. Clicking on a notebook will render the html
>> output of nbconvert.
>>
>> I think I understand how all of that will work...
>>
>> The create/edit functionality should be something like :
>>
>> User clicks on button to create/edit a notebook. The user is
>> authenticated. The notebook app is launched in a new window with a subset
>> of functionality and some ability to upload data.
>>
>> tmpnb seems like a nice approach b/c the notebook container is
>> automatically created and destroyed when it's not being used. I'm not sure
>> about how well it handles the authentication piece though.
>>
>> Maybe some one could give me a rundown of the difference between tmpnb
>> and  JupyterHub? I'm not finding much info on this subject.
>>
>> Thanks again!
>>
>> -phil
>>
>> On Tuesday, April 11, 2017 at 6:43:47 AM UTC-4, takowl wrote:
>>>
>>> On 10 April 2017 at 15:12, Philip Matheson  wrote:
>>>
>>>> I'm just starting to research how this might work and wondering if
>>>> anyone can point me to a project or documentation that might discuss this
>>>> type of thing.
>>>>
>>>
>>> It depends quite a bit on how much of Jupyter you want to embed - do you
>>> want to make your own interface that talks to Jupyter kernels? Or embed
>>> notebooks into your own website?
>>>
>>> Thebe is an example of talking to Jupyter kernels from a different web
>>> interface:
>>> https://oreillymedia.github.io/thebe/
>>>
>>> Thomas
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/82871f8e-538f-486b-83a6-dfea7d549d6f%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/82871f8e-538f-486b-83a6-dfea7d549d6f%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael Milligan, Ph.D. | Supercomputing Institute
Assistant Director for  | University of Minnesota
   Application Development  | milli...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gqVgELjLJAtArzWRwZ0PA22ne%3DN0xVZsat25WyUU%2BTEww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Re: Two Instances of Jupyter HUB

2018-08-04 Thread Michael Milligan
Hi,

I'd like to mention ProfileSpawner (part of Wrapspawner) as an option here
as well. It exists specifically to support multiple user-selectable spawner
configurations in a single JupyterHub instance. It's actually your only
option if you want to switch between multiple Spawner classes, but it also
works quite well for smaller configuration tweaks like this, and is totally
agnostic about which spawning mechanism you need to use.

https://github.com/jupyterhub/wrapspawner/



On Fri, Aug 3, 2018 at 9:32 PM, J bhatt  wrote:

> Thank you very much ! this really helps
>
> On Friday, August 3, 2018 at 9:26:55 PM UTC-4, ri...@globus.org wrote:
>>
>> Here are links to DockerSpawner and SingularitySpawner. The latter allows
>> the user to specify the path to the Singularity image they want to use.
>>
>> https://github.com/jupyterhub/dockerspawner
>> https://github.com/ResearchComputing/jupyterhub-singularity-spawner
>>
>> You can override the text field in the form with radio buttons, here's an
>> example of that:
>>
>> https://github.com/ericblau/jupyterhub-singularity-spawner/
>> blob/master/singularityspawner/singularityspawner.py
>>
>> --Rick
>>
>> On Friday, August 3, 2018 at 6:53:48 PM UTC-5, ri...@globus.org wrote:
>>>
>>> Hi,
>>>
>>> You don’t need to run separate JupyterHub instances, you can achieve
>>> this by using a spawner that launches either the traditional Notebook
>>> Server or JupyterLab. A container spawner like Docker or Singularity works
>>> well for this use case. The user can be pretty prompted to select which one
>>> they want to spawn.
>>>
>>> I’ll try to find a link to post with an example implementation.
>>>
>>> —Rick
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/4b8f8751-185c-46de-a1fa-e21adfe22339%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/4b8f8751-185c-46de-a1fa-e21adfe22339%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael Milligan, Ph.D. | Supercomputing Institute
Assistant Director for  | University of Minnesota
   Application Development  | milli...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gph3zg0mo-toQQu8fs8OAp%3DwMhj88pcxMWw3YiQ17YaqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] Batchspawner 0.8 released

2018-05-02 Thread Michael Milligan
Batchspawner is a Jupyterhub spawner extension that integrates with cluster
job managers such as commonly found in HPC computing centers. After a long
period of percolation, version 0.8 has been officially released.

This version includes support for Torque, Slurm, LSF, Moab, Condor, and
Grid Engine. Downloads and full changelog available here:

https://github.com/jupyterhub/batchspawner/releases

Starting with this release, Batchspawner is available on PyPI and can be
installed with

pip install batchspawner

We understand that your local supercomputer admins may not have time to
deploy the latest versions of everything, so Batchspawner is tested against
Python 3.3 through 3.6, and Jupyterhub 0.5 through master.

Please note that since our last release, WrapSpawner and ProfilesSpawner
(which allow dynamic selection of spawner parameters) have been split out
into a separate project:
https://github.com/jupyterhub/wrapspawner

Thanks,
Michael

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gr4gDNqn_oKHxrs1AUsA3tyOH7bWjEm9uSkV-uepG8i2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Running the proxy without SSL

2018-03-22 Thread Michael Milligan
Hi Norman -

You are correct that Jupyterhub will serve without SSL simply by not
providing the SSL keys. There used to be an explicit "--no-ssl" flag but
that was deprecated with the 0.7 release.

My suspicion is that this is going to be more finicky than you would like.
Presumably you want users to be able to connect to the service using either
endpoint. The simplest approach would be to run two fully parallel
Jupyterhub stacks, but in that case your users would get two independent
sessions if they connected through both endpoints. Maybe that is acceptable
for your use case.

If not, you thus need to ensure that both Hub/Proxy pairs know about
sessions and routes modified by the other. You can do this by pointing them
at a common database backend, but I don't think this has been extensively
tested and there may be corner cases where one Hub fails to query the DB at
the right time. Certainly you will want to use a RDBMS server backend,
since the default sqlite implementation is not safe for parallel access.

Alternately, and possibly more robustly, you could subclass the Proxy
interface to make a single Hub drive two copies of the Proxy component.
https://jupyterhub.readthedocs.io/en/latest/reference/proxy.html

Personally, I would just run a single Jupyterhub stack (without SSL) behind
nginx, and also have nginx or the Proxy (see "--redirect-port" at
https://github.com/jupyterhub/configurable-http-proxy) serve a redirect
from port 8000 to the nginx endpoint.

Regards,
Michael

On Thu, Mar 22, 2018 at 1:04 PM, Norman Gray <norman.x.g...@gmail.com>
wrote:

>
> Roland, hello.
>
> On 22 Mar 2018, at 8:22, Roland Weber wrote:
>
> Afaik, listening on two different ports is not possible without changing
>> code.
>>
>
> Righto -- thanks for confirming.
>
> You could also solve your problem by keeping JupyterHub on the deprecated
>> SSL port, and encrypting the connection between the SSL-terminating proxy
>> and JupyterHub.
>>
>
> Yes -- I'm going to run two servers, an exposed SSL one and a
> reverse-proxied non-SSL one.
>
> Are they likely to fight with one another, do you think?  I can't think of
> a reason why they would, but I could be lacking imagination here.
>
> I'm sure that pull requests to improve the documentation will be happily
>> accepted :-)
>>
>
> I've added an issue <https://github.com/jupyterhub/jupyterhub/issues/1747>
> which includes some suggested text.
>
> Thanks for your help.  Best wishes,
>
> Norman
>
>
> --
> Norman Gray  :  https://nxg.me.uk
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/jupyter/2F6AB0DA-4FA4-49B9-A202-231700E5090D%40gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael Milligan, Ph.D. | Supercomputing Institute
Assistant Director for  | University of Minnesota
   Application Development  | milli...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gpePT3_90VbpWWHj_kZoN%3DDWFAtQ5qxvXgBnLoVP%2BJpGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Jupyter notebook for concurrent logins and shared libraries

2018-03-21 Thread Michael Milligan
For #2 it depends on how complex your dependencies are, but in general
making each virtual environment available as a Jupyter kernel should do
what you want. Hint: you'll want to edit the "kernel.json" files to give
them descriptive names for the UI!

On Wed, Mar 21, 2018 at 3:49 PM, Paul Hobson  wrote:

> Rockssk,
>
> I think JupyterHub can handle parts 1 and 3:
> https://github.com/jupyterhub/jupyterhub
>
> I'm not sure about your needs for 2, though.
> -paul
>
>
>
> On Wed, Mar 21, 2018 at 1:42 PM, rockssk  wrote:
>
>> All,
>>
>>we have multiple python projects going on currently , each have their
>> own virtual environment and maintain the dependant packages/libraries
>> within the venv
>>
>>We are looking for a solution where
>>   1. Multiple developers can login at the same time into a central
>> notebook app, and execute code within their venv
>>   2. Maintain dependent libraries/packages at a central location.
>>   3. Be able to execute python and pyspark code from the notebook
>>
>>
>> Any pointers/solution is much appreciated
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jupyter+unsubscr...@googlegroups.com.
>> To post to this group, send email to jupyter@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/jupyter/85ac7264-fb12-424c-baef-94206e0147e5%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/CADT3MEAWppBaqnw3Cpq%2B0e-nmOaxYqq8Rvv5yr4gPG_ef%2B4u1Q%
> 40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gq1pnaov1uht36-vOrV4Gb9dHrHQxZjzhadnJAZrZw8tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] JupyterHub on a cluster with local spawning and batch spawning

2018-03-16 Thread Michael Milligan
Yes, in general that's the correct idiom. You probably need to explicitly
import your base class though (i.e. add "import batchspawner.LsfSpawner"
before you declare your subclass).

That said, both of those req_* options look like good candidates for adding
to the base class, especially since req_partition already exists in at
least one other batchspawner subclass.

On Fri, Mar 16, 2018 at 11:15 AM, Brian Fulton-Howard <fulto...@gmail.com>
wrote:

> Thanks!
>
> I have a potential addition to my config file. I had to subclass the
> LsfSpawner class because it appears incomplete and doesn't have all of the
> options required for our cluster. Does this look right?
>
> c.JupyterHub.spawner_class = 'wrapspawner.ProfilesSpawner'
> c.Spawner.http_timeout = 120
> #---
> ---
> # BatchSpawnerBase configuration
> #   Providing default values that we may omit in the profiles
> #---
> ---
> c.BatchSpawnerBase.req_runtime = '12:00'
> #---
> ---
> # ProfilesSpawner configuration
> #---
> ---
> # List of profiles to offer for selection. Signature is:
> #   List(Tuple( Unicode, Unicode, Type(Spawner), Dict ))
> # corresponding to profile display name, unique key, Spawner class,
> # dictionary of spawner config options.
> #
> # The first three values will be exposed in the input_template as
> {display},
> # {key}, and {type}
> #
>
> ## Override LsfSpawner to be compatible with Minerva
>
> class MinervaSpawner(batchspawner.LsfSpawner):
> batch_script = Unicode('''#!/bin/sh
> #BSUB -R "span[hosts=1]"# Only spawn job on one server
> #BSUB -P {account}
> #BSUB -q {queue}
> #BSUB -m {partition}
> #BSUB -R rusage[mem={memory}]
> #BSUB -n {nprocs}
> #BSUB -J spawner-jupyterhub
> #BSUB -o {homedir}/.jupyterhub.lsf.out
> #BSUB -e {homedir}/.jupyterhub.lsf.err''')
>
> req_partition = Unicode('', \
> help="Partition name to submit job to resource manager"
> ).tag(config=True)
>
> req_account = Unicode('', \
> help="Account name to submit job to resource manager"
> ).tag(config=True)
>
> c.ProfilesSpawner.profiles = [
>( "Local server", 'local', 'jupyterhub.spawner.SudoSpawner', {'ip':
> '0.0.0.0'} ),
>('Bode - 2 cores, 4 GB, 8 hours', 'bode2c4g12h', 'MinervaSpawner',
> dict(req_nprocs='2', req_queue='premium', req_runtime='8:00',
> req_memory='4000',
>  req_partition='bode', req_account='acc_LOAD')),
>('Manda - 8 cores, 128 GB, 4 hours', 'manda128gb', 'MinervaSpawner',
> dict(req_nprocs='8', req_queue='premium', req_runtime='4:00',
> req_memory='16000',
>  req_partition='bode', req_account='acc_LOAD')),
>('Bode - 2 cores, 4 GB, 24 hours', 'mesabi2c4gb24h',
> 'batchspawner.TorqueSpawner',
> dict(req_nprocs='2', req_queue='premium', req_runtime='24:00',
> req_memory='4gb',
>  req_partition='bode', req_account='acc_LOAD')),
>]
>
>
>
> On Thursday, March 15, 2018 at 6:47:28 PM UTC-4, Michael Milligan wrote:
>>
>> Hi Brian -
>>
>> It is possible, and it sounds like you already mostly have the solution!
>> The example config at the end of the batchspawner README should be roughly
>> what you want, except that you will use the SudoSpawner instead of
>> LocalProcessSpawner. Specifically, you need to install all of the spawners
>> you are using alongside Jupyterhub (e.g. pip install wrapspawner,
>> batchspawner, and sudospawner into the same virtualenv as jupyterhub) --
>> the ProfilesSpawner configuration will tell Jupyterhub which spawner to use
>> in response to the user's menu selection.
>>
>> Sorry about the confusing state of the documentation about how to do
>> this. Batchspawner and wrapspawner were originally distributed in the same
>> repository, and when we split them apart it sounds like we may not have
>> included enough context on one side or the other. We're happy to get
>> suggestions about how to improve the docs if you'd like to give us some
>> feedback when you get a chance.
>>
>> Regards,
>> Michael
>>
>> On Thu, Mar 15, 2018 at 4:58 PM, Brian Fulton-Howard <fult...@gmail.com>
>> wrote:
>>
>>> As I understand it, I need to use some combination of wrapspawner,
>>> localspawner, sudospawner and batchspawner. I want to run jupyterhub as an
>>> unprivileged user, but the admins are happy

Re: [jupyter] JupyterHub on a cluster with local spawning and batch spawning

2018-03-15 Thread Michael Milligan
Hi Brian -

It is possible, and it sounds like you already mostly have the solution!
The example config at the end of the batchspawner README should be roughly
what you want, except that you will use the SudoSpawner instead of
LocalProcessSpawner. Specifically, you need to install all of the spawners
you are using alongside Jupyterhub (e.g. pip install wrapspawner,
batchspawner, and sudospawner into the same virtualenv as jupyterhub) --
the ProfilesSpawner configuration will tell Jupyterhub which spawner to use
in response to the user's menu selection.

Sorry about the confusing state of the documentation about how to do this.
Batchspawner and wrapspawner were originally distributed in the same
repository, and when we split them apart it sounds like we may not have
included enough context on one side or the other. We're happy to get
suggestions about how to improve the docs if you'd like to give us some
feedback when you get a chance.

Regards,
Michael

On Thu, Mar 15, 2018 at 4:58 PM, Brian Fulton-Howard 
wrote:

> As I understand it, I need to use some combination of wrapspawner,
> localspawner, sudospawner and batchspawner. I want to run jupyterhub as an
> unprivileged user, but the admins are happy to edit the sudoers file to
> make it work. What I'd like to do is give users in my lab a choice to start
> on the LSF cluster (batchspawner) or locally (localspawner). Wrapspawner
> would provide the interface to make a selection.
>
> Is this possible, and how would I go about doing it? I looked in the
> documentation for the various spawners and didn't find any detailed
> information.
>
> The cluster supports PAM, so I don't need any special authenticator.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/a3f21888-0495-4fe0-b598-ca7e226bd61f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gqaTXd9RtQ8hPD4F%2BQdV7ftstfqw0GG9ZN4h6_OrAk9CA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Msg type description

2018-03-13 Thread Michael Milligan
Probably this is the documentation you are looking for:
http://jupyter-client.readthedocs.io/en/stable/messaging.html

On Mar 13, 2018 7:07 PM,  wrote:

> Hi,
>
> I'm analyzing Jupiter Notebook kernel data and found some message types. I
> couldn't find the documentation of the message types online. If anyone
> could help clarify, that would be great.
>
> Type:
>
> 1) execute_result: I assume this means program runs without any syntax error.
>
> 2) stream: don't know this one at all
>
> 3) display_data: does this mean displaying any plots?
>
> 4) error: I assume this means syntax error.
>
>
> Thank you!
>
> Phoebe
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/a4bd372e-82e0-4ee5-a971-4c5327b639c6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gqhWPq%3Df826wiCk0_%3DDhj8G2JE0wv%3DwTK-BmhumsLeftA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Environment variables PATH and PYTHONPATH not available in notebook

2018-03-09 Thread Michael Milligan
I wonder if you just didn't try all the permutations here. You mention that
you did try /etc/profile, but possibly you didn't try it again after
configuring shell_cmd?

Quoting from the Bash manpage:

>When  bash  is  invoked  as  an interactive login shell, or as a
> non-interactive shell with the --login
>option, it first reads and executes commands from the file
> /etc/profile, if that  file  exists.   After
>reading  that  file,  it  looks  for ~/.bash_profile,
> ~/.bash_login, and ~/.profile, in that order, and
>reads and executes commands from the first one that exists and is
> readable.  The --noprofile option may
>be used when the shell is started to inhibit this behavior.
>

Without shell_cmd I wouldn't expect any profile settings to be read,
because Popen just directly launches the singleuser server without an
intervening Bash process.


On Mon, Mar 5, 2018 at 8:38 AM,  wrote:

> Hi,
>
> I set up the vanilla Jupyterhub (0.8.1 on an Ubuntu 16.04 LTS server) with
> a basically unmodified configuration, except for SSL certs. The bash.bashrc
> (I also tried /etc/profile) file in /etc/ contains some additional export
> entries for PATH and PYTHONPATH, but they are never avaiblable in the
> notebooks unless I set them myself using
>
> import sys
> sys.path.append('/opt/my/speciallibrary')
>
> which as you can imagine is kind of impractical. However, the variables
> are available in the normal Python REPL as well as in the terminal in
> Jupyter.
>
> The generated default configuration suggests that those variables are
> passed through the filter, therefore his shouldn't pose a problem.
> *which -a* suggests all libraries are installed globally and otherwise
> everything works as it should. I'm running the hub with sudo as this is the
> suggested method to get multiple users with the default settings. It's a
> demo server for a notebook plugin prototype and all users can be trusted to
> not break stuff on purpose.
> *jupyter troubleshoot* displays the correct $PATH and sys.path values, so
> the variables are in Jupyter but somehow omitted or reset by the kernels?
>
> MinRK figured it could have something to do with the spawners not using
> login shells so he suggested to run one previous to starting the kernel by
> setting the configuration
>
>
> c.LocalProcessSpawner.shell_cmd = ['bash', '-l', '-c']
>
> but unfortunately that doesn't seem to have any effect, either.
>
> Does anyone have an idea what else could have gone wrong or is missing?
>
> I'm comming straight from https://github.com/jupyterhub/
> jupyterhub/issues/1695 and am hoping to find more input here, because
> it's still unclear to me if this even is a bug; which it probably isn't.
>
> Best regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/8fa8b180-87b3-41ff-b229-f9874b778cd4%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8go4v8v6DNE0j7KPZNmgQshnWyG4C1OAc%2B4y23bnBX0CCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Blocking copy/paste functionality to JupyterHub

2018-02-21 Thread Michael Milligan
Hi Jeremy,

Your original question made it sound like you might be using the notebook
purely as a dashboard interface with some level of point-and-click
interactivity. This should be doable using the advice you have already
received, provided you have good control of your users work environment. If
you do not, then you must consider that any restrictions implemented in
client-side JS can be circumvented by browser extensions. This is before
you even consider the screenshot hole, which lately also includes cell
phone photos of the screen.

Now that you have added the requirement that users be able to input and
execute normal code cells, you may need to rethink your security model even
further. A few lines of Python is quite adequate to upload a dataset to an
outside server, load new JS code into the browser, or make arbitrary
changes to locally writable files. In the general case, preventing data
exfiltration is a hard problem, even with very strict controls on the users.

My advice, based on my organization's work to build a system with similar
requirements, is this: if you want to use a system as flexible as Jupyter,
forget about detailed control of how your users interact with data.
Instead, focus your technical effort on detailed logging of which users
have been given access to which data, educate your users about acceptable
data use, and make it crystal clear that they will be held accountable if
data is mishandled.

Regards,
Michael

On Feb 20, 2018 6:41 PM, "Jeremy Ho"  wrote:

Hi Matthias,

Thank you for your response. For some background context, the notebooks
will have access to sensitive data sources that we don't want to have
leaving the notebooks, and we also don't want to have users can inserting
their own content into the environment.

Blocking copy and paste is one of the main features that we wish to
achieve. Essentially, we would like to ensure that a JupyterHub notebook
user is able to use and modify their notebooks at will normally (via
typing, clicking and normal keystrokes), but disallow them from inserting
or removing data to and from said notebooks via copy/paste. Additionally,
we would like to prevent the the mouse right click or equivalent keyboard
event as well.

In the meantime, I will go ahead and take a look at inserting the
Javascript example solution you have provided into the Jupyter Notebook
image and evaluate if it meets our requirements. I will also experiment
with additional Javascript code in that js file intercepting other events
(equivalent to right click) in addition to Clipboard event. If you have any
other ideas or suggestions, please let me know.

Thanks again,
Jeremy


On Tuesday, 20 February 2018 10:17:24 UTC-8, Matthias Bussonnier wrote:

> Hello Jeremy,
>
> Thanks for your question,
>
> A few Questions: is copy and past the only thing you want to block ? Do
> you sill want users to be able to modify notebooks by typing ? Is the a
> specific requirement/certification you need to have ?
>
> A couple of clarification as well: JupyterHub act only as a proxy it is
> likely note JupyterHub, but Jupyter notebook itself that you will need to
> patch/configure to do so. It is not baked in but you probably can use
> extensions mechanism to do that.
>
> There are ways in Javascript to prevent copy pasting, for example:
>
> document.addEventListener('copy', function(e){
> e.clipboardData.setData('text/plain', 'NO');
> e.preventDefault(); // We want our data, not data from any selection,
> to be written to the clipboard
> });
>
> Will listen for copy events and replace the Data by "NO", you can also
> ping a custom URL to log when users are trying to copy.
> Adapt for past events as well.
>
> For the classic notebook you can either build that as an extension, or put
> it in users's `custom.js` (which I guess you will have control over)
>
> Does that make some sens ?
> --
> Matthias
>
>
>
>
> On 19 February 2018 at 12:22, Jujaga  wrote:
>
>> Hi all,
>>
>> Our group is currently leveraging zero-to-jupyterhub-k8s in order to
>> provide Notebooks to a multi-user environment via Kubernetes. However, we
>> also have a business requirement where we must prevent users from copying
>> information out of the Notebooks, as well as preventing the insertion of
>> code and other information into the Notebooks. We want to effectively block
>> any textual information to and from the client's browser while still
>> maintaining their ability to use the Notebooks.
>>
>> We were wondering if there exists a method of achieving this? We are more
>> than happy to provide more information and context as needed.
>>
>> Thanks in advance,
>> Jeremy
>>
>> --
>> Jeremy Ho
>> Software Engineer
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jupyter+u...@googlegroups.com.
>> To post to this group, send 

Re: [jupyter] Implementation Kaggle Kernel

2018-01-23 Thread Michael Milligan
I would guess the reason you haven't gotten much response yet is that it's
not clear what aspect of that site you want to reproduce, or more generally
what is your goal here? If you want to statically render versioned
notebooks, Github or NBviewer does a good job of that. You could also use
nbconvert as part of a static site-builder workflow. Alternately you could
set up repositories to run through Binderhub using mybinder.org links.
Reimplementing all of Kaggle on your personal webpage is probably beyond
your means, and also massive overkill if you just want to showcase some
notebooks that you made. But, if you have a team and funding ready to get
started implementing a Kaggle competitor or other data-science-portal type
thing, then by all means let this community know and you might get a
different level of interest.

Regards,
Michael

On Sun, Jan 21, 2018 at 6:48 AM, <hskinternational@gmail.com> wrote:

> Hi
>
>I am very keen to create a Kaggle Kernel like script on my personal
> webpage.
>
>Similar to https://www.kaggle.com/kernels where users who could simple
> execute a Jupyter Notebook (all libraries pre-loaded)
>
>Can someone shed me some resources on whats' the best technology / web
> frameworks I should use?
>
>Appreciate in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/b18536e5-096a-49ca-b9ae-ed72c90ddad1%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/b18536e5-096a-49ca-b9ae-ed72c90ddad1%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael Milligan, Ph.D. | Supercomputing Institute
Assistant Director for  | University of Minnesota
   Application Development  | milli...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gqCXexw60HAzAtBTsDBFv2OMAUXYtC0FcV-ne03Q5PMMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Invalidate spawn in pre_spawn_hook?

2018-01-20 Thread Michael Milligan
I'm surprised to hear that throwing an exception there causes any havoc; in
the code there is a generic exception handler that shouldn't let any
uncaught exceptions leak through. There is potential for trouble, though,
if you are using a spawner that does some vial initialization during the
start() call, such that calling stop() or start_polling() throws an
exception if start() was not previously called. If that is what's
happening, it would be a bug in the spawner class and you would want to
file an issue with the corresponding project.

Michael

On Fri, Jan 19, 2018 at 12:51 PM, Tim Harsch <harschw...@gmail.com> wrote:

> Thank you Michael, that is very helpful. In this case I am using
> pre_spawn_hook, in lieu of a spawner options form.   So I think the
> exceptions are causing havoc to the server.
> I went the route of the pre_spawn_hook because in my case because the user
> doesn't need to inform the hub of the docker image, it can be done in the
> hook.   But that's where an issue could arise..  and I'm not sure to handle
> it gracefully.
>
> Tim
>
>
> On Friday, January 19, 2018 at 9:44:34 AM UTC-8, Michael Milligan wrote:
>>
>> Hi,
>>
>> The Spawner's start() function is called unconditionally after
>> pre_spawn_hook() returns, so you're correct that the return value will have
>> no effect. However, if you raise an exception, it will be caught by the app
>> and the associated error message will be logged. There are some cases where
>> exception error messages are displayed to the user. If I'm correctly
>> interpreting the code, in this case a message will be displayed *if* you
>> have a spawner options form set up.
>>
>> Michael
>>
>> On Fri, Jan 19, 2018 at 11:06 AM, Tim Harsch <harsc...@gmail.com> wrote:
>>
>>> Hi all,
>>> Is there a way in the pre_spawn_hook I could invalidate the spawn?
>>>  return True/False doesn't work.   I'd like it to ultimately produce a user
>>> friendly result to the user if an issue occurs
>>>
>>> Thanks,
>>> Tim
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Project Jupyter" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jupyter+u...@googlegroups.com.
>>> To post to this group, send email to jup...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jupyter/97c1bbb1-ada9-44b0-ad68-aff8b1181e94%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jupyter/97c1bbb1-ada9-44b0-ad68-aff8b1181e94%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Michael Milligan, Ph.D. | Supercomputing Institute
>> Assistant Director for  | University of Minnesota
>>Application Development  | mill...@umn.edu
>> www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857 <(612)%20624-8857>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/8cece011-11eb-4053-86e0-13ca6a0c8cd6%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/8cece011-11eb-4053-86e0-13ca6a0c8cd6%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael Milligan, Ph.D. | Supercomputing Institute
Assistant Director for  | University of Minnesota
   Application Development  | milli...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8goJNim%3DFRC-u2tGCvO6fmV3YsXzgBUKXDxL2Op_EmsrNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Invalidate spawn in pre_spawn_hook?

2018-01-19 Thread Michael Milligan
Hi,

The Spawner's start() function is called unconditionally after
pre_spawn_hook() returns, so you're correct that the return value will have
no effect. However, if you raise an exception, it will be caught by the app
and the associated error message will be logged. There are some cases where
exception error messages are displayed to the user. If I'm correctly
interpreting the code, in this case a message will be displayed *if* you
have a spawner options form set up.

Michael

On Fri, Jan 19, 2018 at 11:06 AM, Tim Harsch <harschw...@gmail.com> wrote:

> Hi all,
> Is there a way in the pre_spawn_hook I could invalidate the spawn?
>  return True/False doesn't work.   I'd like it to ultimately produce a user
> friendly result to the user if an issue occurs
>
> Thanks,
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/97c1bbb1-ada9-44b0-ad68-aff8b1181e94%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/97c1bbb1-ada9-44b0-ad68-aff8b1181e94%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael Milligan, Ph.D. | Supercomputing Institute
Assistant Director for  | University of Minnesota
   Application Development  | milli...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gp%3DhbGz-8Nd0ny-8dkt9smTgXaGLqo0xane%2BM%3DGChiE8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Online converter notebook->html

2018-01-16 Thread Michael Milligan
Hi,

As far as Jupyter components go, the basic nbconvert install only requires
the jupyter_core package. Jupyterhub is unrelated to your use-case. Using
pip or conda to install nbconvert will pull in the bits you need
automatically.

If you are simply planning to render prepared notebooks to HTML, that's
probably all you need. If you want to output formats other than HTML, you
will also need to install pandoc and possibly a TeX distribution. If you
wanted to use the "--execute" flag to actually generate the output cells,
then the problem would be much harder, but fortunately it sounds like
that's beyond the scope of what you're trying to do.

On Tue, Jan 16, 2018 at 4:38 PM, Angel Marchev, Jr. <anmarc...@gmail.com>
wrote:

> Hi all,
> I am trying to implement in my website an online, on-the-fly converter of
> notebooks which I figured should be working something like this:
> 1) I compute and save my notebook (with images, base64) on some (local or
> virtual) machine;
> 2) I go to my website (Wordpress), I start a new page
> 3) In the new page I click a button to upload my saved notebook and it is
> converted to standard html form and imported in the page (not as iframe)
> 4) If it is possible (not sure yet) I would like to edit the notebook (in
> html form) after that for additional corrections.
>
> I found out that converting notebooks to HTML (and other formats) could be
> done by nbconvert.
>
> So the questions are:
> * Do I need to install full Jupiter package for using only nbconvert?
> * If yes, then which version - Jupyter or JupiterHub? (My site is
> multiuser community)
> * Is there something that I am missing or something that you would advise
> me?
>
> I am fairly well familiar with php for wordpress development, but I only
> started using jupyter notebook recently and probably my questions may seem
> very basic.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/c3316cf9-3042-4c47-9855-522194f9075c%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/c3316cf9-3042-4c47-9855-522194f9075c%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael Milligan, Ph.D. | Supercomputing Institute
Assistant Director for  | University of Minnesota
   Application Development  | milli...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gohxP2xsoXE5oU6BqWCz_eKqAW%2B5qxq7ig3r0iM2G1h5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] xterm.js in released version?

2016-11-11 Thread Michael Milligan
Quick question for you all. My users are still complaining that things like 
copy/paste don't work in the Jupyter Notebook terminal app. Reading through 
the thread and linked PRs at https://github.com/jupyter/notebook/issues/104 
it appears that this should be fixed with the switch to xterm.js. 

Now as far as I can tell, the most recent release of the notebook is 4.2.3, 
and that does NOT yet contain this change. Is there any hope of getting 
this switch into a released version sometime soon? We are not wild about 
using an unreleased version for our main Jupyterhub service here.

Thanks!
Michael


-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/31cf02da-1311-4b44-978c-c6525fccf612%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.