split subter implementation (training + inference)

This commit is contained in:
Jan Kowalczyk
2024-10-17 08:36:18 +02:00
parent 5014c41b24
commit ddf4e4aa36
11 changed files with 699 additions and 145 deletions

View File

@@ -10,40 +10,51 @@
};
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{
self,
nixpkgs,
flake-utils,
poetry2nix,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
pkgs = import nixpkgs{
inherit system;
config.allowUnfree = true;
config.cudaSupport = true;
};
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
config.cudaSupport = true;
};
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication;
in
{
packages = {
deepsad = mkPoetryApplication {
projectDir = self;
preferWheels = true;
python = pkgs.python311;
deepsad = mkPoetryApplication {
projectDir = self;
preferWheels = true;
python = pkgs.python311;
};
default = self.packages.${system}.deepsad;
};
devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.deepsad ];
buildInputs = with pkgs.python311Packages; [
torch-bin
torchvision-bin
];
#LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
#pkgs.stdenv.cc.cc
#];
buildInputs = with pkgs.python311Packages; [
torch-bin
torchvision-bin
];
#LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
#pkgs.stdenv.cc.cc
#];
};
devShells.poetry = pkgs.mkShell {
packages = [ pkgs.poetry pkgs.python311 ];
packages = [
pkgs.poetry
pkgs.python311
];
};
});
}
);
}