EntropyOrg / p5-Devel-IPerl

:microscope::books: Perl5 language kernel for Jupyter <http://jupyter.org/>
http://p3rl.org/Devel::IPerl
93 stars 15 forks source link

How to spawn from Jupyterhub? #96

Open perllaghu opened 5 years ago

perllaghu commented 5 years ago

I'm trying to write a Dockerfile to build an image that will launch from a Jupyterhub Spawner.

I've a number of existing examples that work (python2, python3, Octave, Sage, MatLab, LSST, etc) - so the basics are fine.

Here's where I've got to:

FROM jupyter/base-notebook
USER root
RUN apt-get update \
  && apt-get install -yq --no-install-recommends git less cpanminus less libzmq3-dev make gcc libc6-dev libnet-https-any-perl

RUN cpanm LWP LWP::Protocol::https Future

RUN lwp-request https://raw.githubusercontent.com/zmughal-p5CPAN/p5-Alt-Alien-ZMQ-Alien-ZMQ-latest/master/maint/install-zmq-libzmq.pl | perl - --notest Alt::Alien::ZMQ::Alien::ZMQ::latest ZMQ::LibZMQ3 Net::Async::ZMQ

RUN cpanm Devel::IPerl

ENTRYPOINT ["/usr/local/bin/iperl"]
CMD ["notebook"]

WORKDIR $HOME
USER $NB_USER

This works fine as a stand-alone docker image†.... but fails with a too many redirects error when I transfer to a hub.

Has anyone got it working, spawned from Jupyterhub?

[†] - remember you need to have use IPerl; as one of the first bits of Perl code :)