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

nixos/jupyter: migrate service to jupyter 7 setup #367106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

b-m-f
Copy link
Contributor

@b-m-f b-m-f commented Dec 21, 2024

The current implementation has problems after the jupyter project introduced changes: https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

This MR:

  • changes the location of the config file for the password setting
  • links to the official docs for hashed password generation
  • uses jupyter notebook command
  • allows adding extra packages to the jupyter runtime environment
  • allows setting extra environment variables

The last 2 changes come with an example in order to add export to WebPDF.

Closes #355046

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: jupyter Interactive computing tooling: kernels, notebook, jupyterlab labels Dec 21, 2024
@b-m-f
Copy link
Contributor Author

b-m-f commented Dec 21, 2024

@aborsu

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Dec 21, 2024
@GaetanLepage
Copy link
Contributor

Thanks for this.
Can you clean the commit history and prefix all commit messages with nixos/jupyter: ?

@b-m-f b-m-f force-pushed the master branch 2 times, most recently from c306cf1 to 672818d Compare December 21, 2024 14:12
@b-m-f
Copy link
Contributor Author

b-m-f commented Dec 21, 2024

@GaetanLepage Updated. Thanks for the guidance

@GaetanLepage
Copy link
Contributor

@GaetanLepage Updated. Thanks for the guidance

The current commit message is Updates jupyter notebook config to work correctly with current versions.
It should start with nixos/jupyter: .....

@b-m-f
Copy link
Contributor Author

b-m-f commented Dec 22, 2024

Updated 🫡

@b-m-f b-m-f force-pushed the master branch 2 times, most recently from 1d673a5 to e842be7 Compare December 23, 2024 09:22
@JohnRTitor JohnRTitor changed the title Migrate jupyter notebook service to jupyter 7 setup nixos/jupyter: migrate service to jupyter 7 setup Dec 23, 2024
Copy link
Contributor

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocked until the above comments are resolved

Copy link
Contributor

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a release notes too.

@b-m-f
Copy link
Contributor Author

b-m-f commented Dec 25, 2024

I’ll implement the changes either on the 31st or in the new year.
Thanks for the input

@b-m-f
Copy link
Contributor Author

b-m-f commented Jan 2, 2025

@JohnRTitor MR is updated

@b-m-f b-m-f force-pushed the master branch 2 times, most recently from 1151605 to 4368108 Compare January 3, 2025 16:26
@github-actions github-actions bot added 8.has: documentation This PR adds or changes documentation 8.has: changelog labels Jan 3, 2025
@b-m-f
Copy link
Contributor Author

b-m-f commented Jan 3, 2025

@JohnRTitor I have added the change into the release-notes. I hope that is the correct place. Notebook config is now included again.

@JohnRTitor JohnRTitor dismissed their stale review January 3, 2025 16:59

changes addressed

Copy link
Contributor

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be backported to 24.11 as notebook 7 exists there too. Please add a release-notes for 24.11 as well.

Diff LGTM, will merge after testing.

nixos/doc/manual/release-notes/rl-2505.section.md Outdated Show resolved Hide resolved
@JohnRTitor JohnRTitor added the backport release-24.11 Backport PR automatically label Jan 3, 2025
@b-m-f b-m-f force-pushed the master branch 2 times, most recently from 5b4a927 to 9775de7 Compare January 3, 2025 17:10
… current versions

Signed-off-by: Maximilian Ehlers <[email protected]>
Signed-off-by: John Titor <[email protected]>
JohnRTitor added a commit to JohnRTitor/nix-conf that referenced this pull request Jan 4, 2025
Copy link
Contributor

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some minor nitpicks.

And tested the module like this JohnRTitor/nix-conf@b6c504a

Lets me login now (with a previously generated password). But when I tried to generate a new one it showed an error. Could you investigate?

image

I am using a pretty basic config. https://github.com/JohnRTitor/nix-conf/blob/b6c504ab5ad36af2e4e0191fa4ca9fa67e04efa4/dev-environment/jupyter.nix

The above code snippet works if I use the server from

nix-shell -p 'python3.withPackages (ps: with ps; [jupyter])' --run 'jupyter notebook'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: jupyter Interactive computing tooling: kernels, notebook, jupyterlab 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 backport release-24.11 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jupyter notebook package is broken and service does not work
3 participants