Skip to content

Instantly share code, notes, and snippets.

@mwdchang
Last active August 4, 2022 20:18
Show Gist options
  • Save mwdchang/63a03e0268c93128be201795c247785f to your computer and use it in GitHub Desktop.
Save mwdchang/63a03e0268c93128be201795c247785f to your computer and use it in GitHub Desktop.
Docker file for IJulia + Catlab
# https://github.com/andferrari/julia_notebook
FROM "jupyter/minimal-notebook"
USER root
ENV JULIA_VERSION=1.7.3
RUN mkdir /opt/julia-${JULIA_VERSION} && \
cd /tmp && \
wget -q https://julialang-s3.julialang.org/bin/linux/x64/`echo ${JULIA_VERSION} | cut -d. -f 1,2`/julia-${JULIA_VERSION}-linux-x86_64.tar.gz && \
tar xzf julia-${JULIA_VERSION}-linux-x86_64.tar.gz -C /opt/julia-${JULIA_VERSION} --strip-components=1 && \
rm /tmp/julia-${JULIA_VERSION}-linux-x86_64.tar.gz
RUN ln -fs /opt/julia-*/bin/julia /usr/local/bin/julia
USER $NB_UID
# Add packages and precompile
RUN julia -e 'import Pkg; Pkg.update()' && \
julia -e 'import Pkg; Pkg.add("Colors"); using Colors' && \
julia -e 'import Pkg; Pkg.add("Catlab"); using Catlab' && \
julia -e 'import Pkg; Pkg.add("IJulia"); using IJulia' && \
julia -e 'import Pkg; Pkg.add("GraphViz"); using GraphViz' && \
julia -e 'import Pkg; Pkg.add("AlgebraicPetri"); using AlgebraicPetri' && \
fix-permissions /home/$NB_USER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment