Commit d365065f authored by Valentin Reis's avatar Valentin Reis
Browse files

adds jupyter shell environment.

parent 402eea61
Pipeline #5449 passed with stages
in 1 minute and 11 seconds
......@@ -30,26 +30,26 @@
}:
let
callPackage = pkgs.lib.callPackageWith (pkgs // argopkgs);
argopkgs = rec {
# library of nix expressions
argolib = import ../lib/utils.nix;
# Argo components (source overridabel via argument)
aml = callPackage ./aml {src = aml-src;};
nrm = callPackage ./nrm {src = nrm-src;};
containers = callPackage ./containers {src = containers-src;};
libnrm = callPackage ./libnrm {src = libnrm-src;};
aml = callPackage ./aml {src=aml-src;};
nrm = callPackage ./nrm {src=nrm-src;};
containers = callPackage ./containers {src=containers-src;};
libnrm = callPackage ./libnrm {src=libnrm-src;};
libnrm-pmpi = libnrm.overrideAttrs (oldAttrs: rec {
configureFlags = "--enable-pmpi";
buildInputs = oldAttrs.buildInputs ++ [ pkgs.mpich2 ];
});
# applications (source overridable via argument)
amg = callPackage ./amg { nrmSupport=true; src = amg-src; };
qmcpack = callPackage ./qmcpack { nrmSupport=true; src = qmcpack-src; };
openmc = callPackage ./openmc { nrmSupport=true; src = openmc-src; };
stream = callPackage ./stream { nrmSupport=true; src = stream-src; };
lammps = callPackage ./lammps { nrmSupport=true; src = lammps-src; };
amg = callPackage ./amg {nrmSupport=true;src=amg-src;};
qmcpack = callPackage ./qmcpack {nrmSupport=true;src=qmcpack-src;};
openmc = callPackage ./openmc {nrmSupport=true;src=openmc-src;};
stream = callPackage ./stream {nrmSupport=true;src=stream-src;};
lammps = callPackage ./lammps {nrmSupport=true;src=lammps-src;};
# data (static, non source overridable via arguments)
openmc-data = fetched openmc/data.json;
......@@ -108,32 +108,32 @@ let
#zmcat = pkgs-stable.haskellPackages.callPackage ./tools/zmcat {};
# ci/experimental environments
testBuildInputs = [
# argotk runs mpiexec:
pkgs.mpich2
# argotk uses hwloc to choose CPU counts:
pkgs.hwloc
# these are needed for some reason:
pkgs.coreutils
pkgs.utillinux
pkgs.git
# argo tools
argotk
# argo components
containers
nrm
];
test = pkgs.stdenv.mkDerivation rec {
name = "testEnv";
buildInputs = testBuildInputs ++ [ stream ];
#required to be able to build the drv.
installPhase = "mkdir $out";
unpackPhase = "true";
__noChroot = true;
buildInputs = [
# argotk runs mpiexec:
pkgs.mpich2
# argotk uses hwloc to choose CPU counts:
pkgs.hwloc
# these are needed for some reason:
pkgs.coreutils
pkgs.utillinux
pkgs.git
# argo tools
argotk
# argo components
containers
nrm
# sample application for testing progress reports:
(stream.override {libnrm = libnrm; iterationCount = "20";})
];
shellHook =''
echo ""
echo "ENTERING ENVIRONMENT: Sources of impurity for this build are: /tmp/ /etc/argo/ /var/run/ /var/lock/".
......@@ -143,17 +143,23 @@ let
source ${argotk}/share/argotk.sh # bash completion
echo ""
'';
# for argotk to find its versioned data
#argotk uses this environment variable.
ARGOTK_SHARE = "${argotk}/share";
#SUDO = builtins.toPath sudoPath;
};
expe = test.overrideAttrs (old:{
buildInputs = old.buildInputs ++ [
buildInputs = testBuildInputs ++ [
#debug tools
pkgs.which
#experiment tools
zymake
#applications
(stream.override {iterationCount = "20000";})
amg
lammps
qmcpack
(stream.override {iterationCount = "2000000";})
openmc
openmc-data
];
......@@ -161,6 +167,30 @@ let
OPENMC_PWD = "${argotk}/share/openmc";
});
jupyter =
let
jupyter = import (fetched jupyter/pin.json) {};
in
(jupyter.jupyterlabWith {
kernels = [
(jupyter.kernels.juniperWith {
name = "analysis";
packages = p: with p; [ ggplot2
pkgs.which
docopt
knitr
cowplot
lubridate
dplyr
ggplot2
xtable
ggthemes
data_table
];
})
];
}).env;
doArgotk = command: test.overrideAttrs (old:{
buildPhase = "argotk "+command;
installPhase = ''
......
{
"fetch": {
"args": {
"fetchSubmodules": false,
"rev": "3bbe91d6d0bd4526cc70b6ebcfa0871432dff329",
"sha256": "04nx4rpvc96l1impv1j75acdpji3p77iszkkgkp7pi8xfrq6hrwg",
"url": "https://github.com/tweag/jupyterWith.git"
},
"fn": "fetchgit"
},
"rev": "refs/heads/master",
"type": "fetchgit",
"url": "https://github.com/tweag/jupyterWith.git"
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment