Skip to content

Instantly share code, notes, and snippets.

@fusetim
Last active August 24, 2021 18:36
Show Gist options
  • Save fusetim/0b0534b3d451bce6aabb5a69a42b8ed4 to your computer and use it in GitHub Desktop.
Save fusetim/0b0534b3d451bce6aabb5a69a42b8ed4 to your computer and use it in GitHub Desktop.
MP2I Jupyter environment (based on Nix, Docker & JupyterWith)
let
jupyter = import (builtins.fetchGit {
url = https://github.com/tweag/jupyterWith;
}) {};
iPython = jupyter.kernels.iPythonWith {
name = "python";
packages = p: with p; [ numpy matplotlib ];
};
cKernel = jupyter.kernels.cKernelWith {
name = "c";
packages = pkgs: with pkgs; [libcue];
};
ocamlKernel = (import (builtins.fetchurl {
url = https://gist.githubusercontent.com/fusetim/e59b17fc9bac31f2e43174fccd14d7e9/raw/278c713c0faedba35f7d120b87ffb41cca707eaa/default.nix;
}) {
name = "ocaml";
packages = p: with p; [];
});
jupyterEnvironment =
jupyter.jupyterlabWith {
kernels = [ ocamlKernel cKernel iPython ];
extraPackages = p: [p.pandoc];
};
in
jupyter.mkDockerImage {
name = "jupyter-mp2i";
jupyterlab = jupyterEnvironment;
}
let
jupyter = import (builtins.fetchGit {
url = https://github.com/tweag/jupyterWith;
}) {};
iPython = jupyter.kernels.iPythonWith {
name = "python";
packages = p: with p; [ numpy matplotlib ];
};
cKernel = jupyter.kernels.cKernelWith {
name = "c";
packages = pkgs: with pkgs; [libcue];
};
ocamlKernel = (import (builtins.fetchurl {
url = https://gist.githubusercontent.com/fusetim/e59b17fc9bac31f2e43174fccd14d7e9/raw/278c713c0faedba35f7d120b87ffb41cca707eaa/default.nix;
}) {
name = "ocaml";
packages = p: with p; [];
});
jupyterEnvironment =
jupyter.jupyterlabWith {
kernels = [ ocamlKernel cKernel iPython ];
extraPackages = p: [p.pandoc];
};
in
jupyterEnvironment.env
@fusetim
Copy link
Author

fusetim commented Aug 24, 2021

See Jupyter-MP2I for more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment