mirror of
https://github.com/dump-dvb/nix-config.git
synced 2024-06-02 22:39:25 +02:00
29 lines
772 B
Nix
29 lines
772 B
Nix
{ pkgs, packages, ... }:
|
|
let
|
|
miniconda-alpine-dockerhub = pkgs.dockerTools.pullImage {
|
|
imageName = "continuumio/miniconda3";
|
|
imageDigest = "sha256:a4b665d2075d9bf4b2c5aa896c059439a0baa5538ca67589a673121c31b4c35d";
|
|
sha256 = "sha256-boIAZ8PaPckWLzYYTqrqMEL7HGbyl9grCJrXOpsBMhg=";
|
|
finalImageTag = "23.3.1-0";
|
|
finalImageName = "miniconda";
|
|
|
|
};
|
|
in
|
|
pkgs.dockerTools.buildImage {
|
|
name = "stateful-jupyterlab";
|
|
tag = "latest";
|
|
fromImage = miniconda-alpine-dockerhub;
|
|
runAsRoot = ''
|
|
#!${pkgs.runtimeShell}
|
|
mkdir -p /workdir
|
|
'';
|
|
config = {
|
|
WorkingDir = "/workdir";
|
|
run = ''
|
|
conda install ${packages} \
|
|
jupyterlab
|
|
'';
|
|
Cmd = [ "jupyter-lab" "--ip=0.0.0.0" "--port=8080" "--no-browser" "--allow-root" ];
|
|
};
|
|
}
|