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

Strange MKL dependency + allowUnfree error #67

Closed
tbenst opened this issue Dec 19, 2019 · 5 comments
Closed

Strange MKL dependency + allowUnfree error #67

tbenst opened this issue Dec 19, 2019 · 5 comments

Comments

@tbenst
Copy link

tbenst commented Dec 19, 2019

Ok I'm baffled...I have { allowUnfree = true; } in my ~/.config/nixpkgs/config.nix and furthermore, I do not use MKL in any python overlays as it breaks scikit-learn.

I have two nearly identical shells other than one using vanilla jupyter and the other jupyterWith:
https://gist.github.com/tbenst/c88da1138628a6be1d5b88d3a9337f2a

The former builds fine, but the latter gives:

error: Package ‘mkl-2019.5.281’ in /nix/store/mi8xmwmybbxa8w7062j1b00q6x42x6gc-source/pkgs/development/libraries/science/math/mkl/default.nix:110 has an unfree license (‘issl’), refusing to evaluate.

Note that nix-shell -p mkl also works fine. Any idea what could be happening?

@mrobakowski
Copy link

I had the same thing happen. For now, I just worked around this by running

NIXPKGS_ALLOW_UNFREE=1 nix-shell

instead of just nix-shell.

@tbenst
Copy link
Author

tbenst commented Dec 20, 2019

I think https://github.com/tweag/jupyterWith/blob/b12e8296a736725690ba73831cc987ce1c016275/default.nix#L2 is the culprit--not sure this is needed...or at least should default to ~/.config/nixpkgs/config.nix. I understand why ignoring overlays unless user opts in may be a good thing for reproducibility / cachix, but don't see the same benefit for config.nix

@guaraqe
Copy link
Contributor

guaraqe commented Jan 13, 2020

The Nixpkgs used by JupyterWith is overrided, and pinned by the commit used in the repo. Since the configuration is defined for each Nixpkgs, it has to be set up manually. The nixpkgs/config.nix file is some magic that only works with the main channel.

For the unfree problem, you can set: { config = { allowUnfree = true; }; } so that MKL builds without using environment variables.

For the problem of having MKL in the dependency graph, did you manage to track which dependency brings with JupyterWith?

@alexvorobiev
Copy link

@tbenst This could be off-topic but we configured numpy with MKL in an overlay and so far haven't had any complaints about scikit-learn. Could you please share what is broken?

@djacu
Copy link
Contributor

djacu commented Aug 12, 2022

Closing out old issues with no activity in preparation for migration to the next branch.

@djacu djacu closed this as completed Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants