Skip to content

Instantly share code, notes, and snippets.

@andrewray
Created March 14, 2016 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewray/a6e44c0ab497e8737dc2 to your computer and use it in GitHub Desktop.
Save andrewray/a6e44c0ab497e8737dc2 to your computer and use it in GitHub Desktop.
Dockerfile to build iocaml and run with jupyter
FROM ocaml/opam
RUN sudo apt-get install -y \
libgmp3-dev \
libzmq3-dev \
libffi-dev \
libssl-dev \
zlib1g-dev \
pkg-config \
build-essential \
python3 \
python3-pip \
unzip
ENV OPAMYES=1
RUN opam depext -u iocaml
RUN sudo pip3 install --upgrade jupyter
RUN opam install -j 2 iocaml
RUN eval `opam config env`
RUN echo \
{ \
\"display_name\": \"OCaml\", \
\"language\": \"ocaml\", \
\"argv\": [ \
\"$(opam config var bin)/iocaml.top\", \
\"-log\", \
\"iocaml.log\", \
\"-object-info\", \
\"-completion\", \
\"-connection-file\", \
\"{connection_file}\" \
] \
} > kernel.json
RUN sudo jupyter kernelspec install --name iocaml-kernel ./
RUN touch ./keyfile
CMD eval `opam config env` && jupyter notebook --debug --ip=0.0.0.0 --Session.keyfile=./keyfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment