Skip to content

Instantly share code, notes, and snippets.

@mausch
Created May 27, 2020 08:32
Show Gist options
  • Save mausch/ad934c176c5fbd897dc12095eb05c790 to your computer and use it in GitHub Desktop.
Save mausch/ad934c176c5fbd897dc12095eb05c790 to your computer and use it in GitHub Desktop.
Nix on Jupyter on Docker
FROM jupyter/minimal-notebook:36bce751008f
USER root
RUN apt-get update && apt-get install -y curl
RUN mkdir /nix
RUN chown jovyan /nix
ENV PATH=/home/jovyan/.nix-profile/bin:$PATH
USER $NB_UID
RUN curl -o nix-install https://nixos.org/nix/install
RUN chmod a+x nix-install
RUN ./nix-install --no-daemon
RUN rm nix-install
USER root
RUN ln -s /nix/var/nix/profiles/per-user/jovyan/profile/etc/profile.d/nix.sh /etc/profile.d/
USER $NB_UID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment