Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New jupyter service #45697

Closed
teto opened this issue Aug 28, 2018 · 6 comments
Closed

New jupyter service #45697

teto opened this issue Aug 28, 2018 · 6 comments
Assignees
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: python 9.needs: documentation

Comments

@teto
Copy link
Member

teto commented Aug 28, 2018

Issue description

Follow up of the newly merged jupyter service (thanks to the authors, that's super cool !):
4d3ce5c from the PR #33673

First of all I've noticed a few errors in the doc (space/missing curly dollar) that generates errors.
For instance if I use the exmaple given for services.jupyter.kernels, I get:
string 'lib/python3.6/site-packages/ipykernel/resources/logo-32x32.png' doesn't represent an absolute path, at /home/teto/dotfiles/nixpkgs/modules/jupyter.nix:35:20

I am looking at getting ihaskell running through this new service which makes ./services/misc/ihaskell.nix redundant (should we remove it ?). It would be better to have the ihaskell package generate a kernel.json as sagemath does (well it's just copied from upstream "/share/jupyter/kernels/sagemath/kernel.json").

A bit of doc on kernel specs:
nixos/modules/services/development/jupyter/kernel-options.nix
https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs

@teto
Copy link
Member Author

teto commented Aug 29, 2018

I managed to make the ihaskell work with the new service (see IHaskell/IHaskell#920) but it's still impractical since I had to wrap ihaskell etc. We definitely should have packages generate a kernel.json and just load it the jupyter service (eventually using JUPYTER_PATH).

@kenogo
Copy link

kenogo commented Jan 6, 2019

I'm definitely interested in how to get python3 to work! Even when removing the logo options, the notebook still isn't able to connect to the kernel. I'm not sure what the -f {connection_file} is supposed to do either. Python doesn't even seem to have a -f flag

Edit: Nevermind, it works on localhost so it has got to be something with my nginx config. I'll write back when I figured it out.

2nd Edit: Fixed it, it must have had something to do with supporting Websocket. I just added the lines of nginx configuration from here

@bsima
Copy link
Contributor

bsima commented Feb 27, 2019

Just to chime in with my experience:

  • the logo32x32 and logo64x64 docs are incorrect, I couldn't get them to work after trying to point to the right place and just commented them out for now. For the record, they should point here but when I try to do so it says that logo32x32 should either be null or path or something like that.
  • if running Jupyter behind Nginx, you need to enable proxyWebsockets, for example:
    "example.com".locations."/" = {
        proxyPass = "http://111.222.333.444:9999";
        proxyWebsockets = true;
    }
    You should probably also enable all the services.nginx.recommended* options.
  • argv should be: [ "${env.interpreter}" "-m" "ipykernel_launcher" "-f" "{connection_file}" ], optionally broken up into a list of multiple strings. The last argument {connection_file} seems to be a special flag passed to ipykernel_launcher

Some details on what's necessary in the kernel spec: #10713 (comment)

@jraygauthier
Copy link
Member

@teto You might want to take a look at #61177 and IHaskell/IHaskell#1027 for the ihaskell integration.

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@jraygauthier
Copy link
Member

Alright, closing. Indeed no longer interested now that I'm using jupyterWIth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: python 9.needs: documentation
Projects
None yet
Development

No branches or pull requests

5 participants