jupyter / docker-demo-images

Demo images for use in try.jupyter.org and tmpnb.org
BSD 3-Clause "New" or "Revised" License
75 stars 132 forks source link

Dockerfile: update IHaskell #105

Closed vaibhavsagar closed 6 years ago

vaibhavsagar commented 6 years ago

This bumps the versions of Haskell packages for IHaskell, and seems to work when I do make dev. Comments, suggestions, and improvements appreciated, especially the part where I change the user to root to install the IHaskell kernel.

Carreau commented 6 years ago

it looks like

-USER root
-
-RUN ihaskell install && \
+RUN ihaskell install --prefix=$CONDA_DIR/share/jupyter/kernels/ && \
     rm -fr $(echo ~/.cabal/bin/* | grep -iv ihaskell) ~/.cabal/packages ~/.cabal/share/doc ~/.cabal/setup-exe-cache ~/.cabal/logs

-USER $NB_USER
-

Solve the permission issue, or at least install the kernelspec in a location which is user writable.

OMG this image takes forever to compile !

Carreau commented 6 years ago

Spoke too soon, the command raise no error, but does nothing apparently.

Carreau commented 6 years ago

My Bad --prefix=$CONDA_DIR should be enough, and the kernel works wth that. The notebook itself seem to have errors... but I'm not a haskeller.

Let me know if you prefer the root method or the --prefix method and we can merge this.

vaibhavsagar commented 6 years ago

The --prefix=$CONDA_DIR method seems preferable, and I've updated my PR accordingly. I didn't know that the sample notebook had errors though, let me build the image again and see if it needs to be fixed on our end or in the Dockerfile. Would you prefer a second PR for that or should I roll those changes (if any) into this one?

vaibhavsagar commented 6 years ago

Okay, I rebuilt it but now the kernel isn't installed (doesn't show up in the list of available kernels for me to choose from). I didn't realise the prefix had to be $CONDA_DIR. Now to rebuild again :sweat_smile:.

vaibhavsagar commented 6 years ago

I think I've fixed the error in the introductory notebook, let me know if you'd like me to split that out into a separate PR :smiley:.

Carreau commented 6 years ago

Okay, I rebuilt it but now the kernel isn't installed (doesn't show up in the list of available kernels for me to choose from)

That is weird it workd for me yesterday. I'll check.

Carreau commented 6 years ago

With the current state of the PR I see the IHaskell kernel, and I can run the notebook, So Im going to merge and would happily get other PRs to have extra fixes if it does not suits you.

Thanks !

vaibhavsagar commented 6 years ago

Thanks for your help!

Carreau commented 6 years ago

Thanks for maintaining IHaskell !