Skip to content

Commit

Permalink
Launch peftai in Jupyter so that developers can then connect to it an…
Browse files Browse the repository at this point in the history
…d run their own code
  • Loading branch information
Atry committed Apr 3, 2024
1 parent aeafa58 commit bb2014a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
17 changes: 3 additions & 14 deletions flake-modules/cuda.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,9 @@ topLevel@{ flake-parts-lib, inputs, ... }: {
# TODO: Figure out if we can use `pkgs.cudaPackages.cudnn.lib` instead of `pkgs.cudaPackages.cudnn`. The `.lib` one is smaller.
pkgs.cudaPackages.cudnn
];
config.devenvShellModule.containers.processes.layers =
(
builtins.foldl'
(layers: cudaPackage: layers ++ [
(inputs.nix2container.packages.${system}.nix2container.buildLayer {
deps = [
cudaPackage
];
inherit layers;
})
])
[ ]
common.config.cuda.packages
);
config.devenvShellModule.containers.processes.layers = lib.mkBefore (
builtins.map (cudaPackage: { deps = [ cudaPackage ]; }) common.config.cuda.packages
);
};
};
});
Expand Down
7 changes: 6 additions & 1 deletion flake-modules/kubernetes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ topLevel@{ flake-parts-lib, inputs, lib, ... }: {
builtins.replaceStrings ["+"] ["_"] runtime.config.version
}";
};
options.devenvContainerName = lib.mkOption
{
type = lib.types.str;
default = "processes";
};
options.pushImage = lib.mkOption
{
default = { };
Expand Down Expand Up @@ -223,7 +228,7 @@ topLevel@{ flake-parts-lib, inputs, lib, ... }: {
} \
"''${skopeoCopyArgsArray[@]}" \
${lib.escapeShellArgs [
"nix:${perSystem.config.devenv.shells.${runtime.config.name}.containers.processes.derivation}"
"nix:${perSystem.config.devenv.shells.${runtime.config.name}.containers.${kubernetes.config.devenvContainerName}.derivation}"
"docker://${kubernetes.config.remoteImage}"
]}
'';
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bb2014a

Please sign in to comment.