Created
July 17, 2019 18:17
-
-
Save costrouc/31905f5a03cc3e9b35b0b2ce67a9ee14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> { }, pythonPackages ? pkgs.python3Packages }: | |
let pythonEnv = pythonPackages.python.withPackages | |
(ps: with ps; [ numpy jupyterlab ]); | |
in { | |
shell = pkgs.mkShell { | |
buildInputs = [ pythonEnv ]; | |
}; | |
# https://grahamc.com/blog/nix-and-layered-docker-images | |
# docker | |
# - docker load < ./result | |
# - docker run -it | |
docker = pkgs.dockerTools.buildLayeredImage { | |
name = "numpy-example"; | |
tag = "latest"; | |
config.Cmd = [ "${pythonEnv.interpreter}" ]; | |
maxLayers = 120; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment