fsprojects / IfSharp

F# for Jupyter Notebooks
Other
442 stars 71 forks source link

Don't start jupyter when registering kernelspec #242

Closed vickumar1981 closed 4 years ago

vickumar1981 commented 4 years ago

Description

Is it possible to not start jupyter when registering kernelspec? everything registers fine and works, but when i run mono ifsharp.exe, it attempts to start the jupyter server, and I would like to do that manually, in a later step in my Dockerfile. I can suppress the error which works fine, just wondering if that behavior could be circumvented.

Repro steps

  1. Run mono ifsharp.exe

Expected behavior

I would expect that running mono ifsharp.exe would only register the kernelspec in Jupyter and then nothing more. To start jupyter, I can just run the command jupyterhub or jupyter notebook later.

Actual behavior

Attempts to start jupyter after registering the kernelspec for F#

Known workarounds

Suppress the error by using set +e.

Related information

cgravill commented 4 years ago

Yes, if you pass --install it'll just do the install and not also launch.

I've only confirmed on Windows but you should be able to do: mono ifsharp.exe --install

vickumar1981 commented 4 years ago

:+1: thanks. didn't know about that switch.

cgravill commented 4 years ago

You're welcome. It's not documented as it's a bit specialized but it's intended for exactly your sort of need:

https://github.com/fsprojects/IfSharp/blob/7926ca9c02f85533e9d7a959ff9bf732e0fb4529/Dockerfile#L51