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

Network (sandbox?) problems during install #1

Open
turion opened this issue Sep 30, 2019 · 5 comments
Open

Network (sandbox?) problems during install #1

turion opened this issue Sep 30, 2019 · 5 comments

Comments

@turion
Copy link

turion commented Sep 30, 2019

I get this far:

$ git clone [email protected]:tweag/blog-resources.git
$ cd blog-resources/monad-bayes-series/
$ nix-shell
these derivations will be built:
  /nix/store/20hirzhz0i127yzxmajc4lcybm0q5fkb-ihaskell-0.9.1.0.drv
  /nix/store/j73z0ladyq4yrw38m55k5pn7d4m9hcha-statistics-0.15.0.0.drv
  /nix/store/rx3mwb7zpds9k6ir5rzvfj3lcjxngd45-ihaskell-hvega-0.2.0.3.drv
  /nix/store/sibyb0yi8saw8bla0an844qza2d21xi4-monad-bayes-0.1.0.0.drv
  /nix/store/g49j5s00kn2yknv1g8151hs9ibf4ja48-ghc-8.4.4-with-packages.drv
  /nix/store/x0k9rww61qayljywdb4pyncxasmdb4al-ihaskell.drv
  /nix/store/26gr83zalnkrfjhciqdfxm3fnnbzhzr0-ihaskell-kernel.drv
  /nix/store/5x3wj8zijkffvwrrd7f39c88p5k5b8gg-jupyterlab-extended.drv
  /nix/store/9xbbdf7hcgh6sxil2vg6f1js6gfx8gjm-python3.7-jupyterlab-0.35.4.drv
building '/nix/store/5x3wj8zijkffvwrrd7f39c88p5k5b8gg-jupyterlab-extended.drv'...
building '/nix/store/20hirzhz0i127yzxmajc4lcybm0q5fkb-ihaskell-0.9.1.0.drv'...
building '/nix/store/j73z0ladyq4yrw38m55k5pn7d4m9hcha-statistics-0.15.0.0.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/rd5iasc26rbi07zmn41krzbpigk8ahzy-ghc-8.4.4.
unpacking sources
unpacking source archive /nix/store/9b8j5vbg94kz2cglzpdy73m2ysic5yc3-statistics-0.15.0.0.tar.gz
source root is statistics-0.15.0.0
setting SOURCE_DATE_EPOCH to timestamp 1539291821 of file statistics-0.15.0.0/tests/utils/Makefile
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main             ( Setup.lhs, /build/Main.o )
installing
Linking Setup ...
Node v8.15.0

> /nix/store/35gq5y1l3b5fh0nf95h0izwaiyb7yvwi-nodejs-8.15.0/bin/npm pack jupyterlab-ihaskell
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/jupyterlab-ihaskell failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /build/.npm/_logs/2019-09-30T13_46_59_160Z-debug.log

Errored, use --debug for full output:
ValueError: "jupyterlab-ihaskell" is not a valid npm package
builder for '/nix/store/5x3wj8zijkffvwrrd7f39c88p5k5b8gg-jupyterlab-extended.drv' failed with exit code 1
cannot build derivation '/nix/store/9xbbdf7hcgh6sxil2vg6f1js6gfx8gjm-python3.7-jupyterlab-0.35.4.drv': 1 dependencies couldn't be built
error: build of '/nix/store/26gr83zalnkrfjhciqdfxm3fnnbzhzr0-ihaskell-kernel.drv', '/nix/store/9xbbdf7hcgh6sxil2vg6f1js6gfx8gjm-python3.7-jupyterlab-0.35.4.drv' failed

I can access https://registry.npmjs.org/jupyterlab-ihaskell via wget and the browser. I don't have a proxy.

It has been suggested on IRC that one can only have network access inside a sandbox for fixed-output derivations. So possibly something here is not a fixed-output derivation and this is why it fails?

@guaraqe
Copy link
Contributor

guaraqe commented Oct 2, 2019

Yes, jupyter has its internal dependency solver that is very difficult to fix. We have instructions for going around it in the main JupyterWith repo README: https://github.com/tweag/jupyterWith#using-jupyterlab-extensions

Can you try and tell us if that works well?

@curiousleo
Copy link
Contributor

@turion I expanded the README a bit to include instruction for running the notebook locally: https://github.com/tweag/blog-resources/blob/master/monad-bayes-series/README.md - it would be great to hear your feedback on whether this helps!

@turion
Copy link
Author

turion commented Aug 23, 2022

I re-encountered monad-bayes recently and gave this another try. The readme is very good and helped me get past the problem I had here. Thanks!

Some issues I encountered:

[`nix.trustedUsers`](https://nixos.org/nixos/options.html#nix.trustedusers)

This has been renamed to nix.settings.trusted-users.

I'm surprised this still pulls in python 2.7!

Also, we seem to be using ghc-8.6.5, which is very old. I'm not sure but it seems that GHC is not in the cache anymore and I'm just building it from scratch. Can that be avoided by updating to a newer GHC which is in the nixos cache?

@turion
Copy link
Author

turion commented Aug 23, 2022

I re-encountered monad-bayes recently and gave this another try. The readme is very good and helped me get past the problem I had here. Thanks!

Some issues I encountered:

[`nix.trustedUsers`](https://nixos.org/nixos/options.html#nix.trustedusers)

This has been renamed to nix.settings.trusted-users.

I'm surprised this still pulls in python 2.7!

Also, we seem to be using ghc-8.6.5, which is very old. I'm not sure but it seems that GHC is not in the cache anymore and I'm just building it from scratch. Can that be avoided by updating to a newer GHC which is in the nixos cache?

Apologies, it seems I'm just building ghc-parser from scratch. Still, it would be great to update GHC.

@turion
Copy link
Author

turion commented Aug 23, 2022

Unfortunately, the build fails again, this time for /nix/store/lpxxs520l5pwlgcs552lwc11xx6wpfxb-ihaskell-0.10.1.2.drv. I've attached a log file.
log.txt

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

3 participants