staged
This commit is contained in:
parent
f20ff92ba8
commit
b7ac282ab0
8 changed files with 51 additions and 24 deletions
|
|
@ -41,10 +41,13 @@ in {
|
||||||
visualvm
|
visualvm
|
||||||
jdt-language-server
|
jdt-language-server
|
||||||
python3Packages.pip
|
python3Packages.pip
|
||||||
(python310.withPackages (ps:
|
(python311.withPackages (ps:
|
||||||
with ps;
|
with ps;
|
||||||
[
|
[
|
||||||
virtualenv
|
virtualenv
|
||||||
|
torch-bin
|
||||||
|
torchvision-bin
|
||||||
|
torchaudio-bin
|
||||||
ipython
|
ipython
|
||||||
i3ipc
|
i3ipc
|
||||||
xlib
|
xlib
|
||||||
|
|
@ -114,12 +117,7 @@ in {
|
||||||
starship
|
starship
|
||||||
flameshot
|
flameshot
|
||||||
yarn
|
yarn
|
||||||
nodePackages.typescript-language-server
|
mpv
|
||||||
nodePackages.eslint
|
|
||||||
nodePackages.prettier
|
|
||||||
nodePackages.vitest
|
|
||||||
nodePackages.pg
|
|
||||||
nodePackages.sqlite3
|
|
||||||
httpie
|
httpie
|
||||||
wrk
|
wrk
|
||||||
nodePackages.pnpm
|
nodePackages.pnpm
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
./steam.nix
|
./steam.nix
|
||||||
./timezone.nix
|
./timezone.nix
|
||||||
./user.nix
|
./user.nix
|
||||||
|
./torch.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
|
|
|
||||||
28
modules/torch.nix
Normal file
28
modules/torch.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.custom.torch;
|
||||||
|
in {
|
||||||
|
options.custom.torch = {
|
||||||
|
enable = mkEnableOption "PyTorch with CUDA support";
|
||||||
|
cudaSupport = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.python311Packages.torch.override { cudaSupport = cfg.cudaSupport; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(python3.withPackages (ps: with ps; [
|
||||||
|
cfg.package
|
||||||
|
numpy
|
||||||
|
]))
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -4,18 +4,18 @@
|
||||||
}: let
|
}: let
|
||||||
python-opencv-headless = pkgs.callPackage ./python-opencv-headless {
|
python-opencv-headless = pkgs.callPackage ./python-opencv-headless {
|
||||||
inherit (pkgs) lib fetchurl;
|
inherit (pkgs) lib fetchurl;
|
||||||
python310Packages = pkgs.python310.pkgs;
|
python311Packages = pkgs.python311.pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
python-pymatting = pkgs.callPackage ./python-pymatting {
|
python-pymatting = pkgs.callPackage ./python-pymatting {
|
||||||
inherit (pkgs) lib fetchPypi;
|
inherit (pkgs) lib fetchPypi;
|
||||||
python310Packages = pkgs.python310.pkgs;
|
python311Packages = pkgs.python311.pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
python-rembg = pkgs.callPackage ./python-rembg {
|
python-rembg = pkgs.callPackage ./python-rembg {
|
||||||
inherit (pkgs) lib fetchPypi;
|
inherit (pkgs) lib fetchPypi;
|
||||||
inherit python-pymatting python-opencv-headless;
|
inherit python-pymatting python-opencv-headless;
|
||||||
python310Packages = pkgs.python310.pkgs;
|
python311Packages = pkgs.python311.pkgs;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
fish-rust = pkgs.callPackage ./fish-rust {};
|
fish-rust = pkgs.callPackage ./fish-rust {};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, python310Packages, fetchurl}:
|
{lib, python311Packages, fetchurl}:
|
||||||
|
|
||||||
python310Packages.buildPythonPackage rec {
|
python311Packages.buildPythonPackage rec {
|
||||||
pname = "opencv-python-headless";
|
pname = "opencv-python-headless";
|
||||||
version = "4.9.0.80";
|
version = "4.9.0.80";
|
||||||
format = "wheel";
|
format = "wheel";
|
||||||
|
|
@ -10,7 +10,7 @@ python310Packages.buildPythonPackage rec {
|
||||||
sha256 = "976656362d68d9f40a5c66f83901430538002465f7db59142784f3893918f3df";
|
sha256 = "976656362d68d9f40a5c66f83901430538002465f7db59142784f3893918f3df";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python310Packages; [
|
propagatedBuildInputs = with python311Packages; [
|
||||||
numpy
|
numpy
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
python310Packages,
|
python311Packages,
|
||||||
fetchPypi,
|
fetchPypi,
|
||||||
}:
|
}:
|
||||||
python310Packages.buildPythonPackage rec {
|
python311Packages.buildPythonPackage rec {
|
||||||
pname = "pymatting";
|
pname = "pymatting";
|
||||||
version = "1.1.13";
|
version = "1.1.13";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
@ -13,12 +13,12 @@ python310Packages.buildPythonPackage rec {
|
||||||
hash = "sha256-LNt8S++s3e9Netwt6ONKJy3mOdYIrlwKCGE9+kJTgQE=";
|
hash = "sha256-LNt8S++s3e9Netwt6ONKJy3mOdYIrlwKCGE9+kJTgQE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with python310Packages; [
|
nativeBuildInputs = with python311Packages; [
|
||||||
setuptools
|
setuptools
|
||||||
poetry-core
|
poetry-core
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with python310Packages; [
|
propagatedBuildInputs = with python311Packages; [
|
||||||
numpy
|
numpy
|
||||||
scipy
|
scipy
|
||||||
pillow
|
pillow
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib,
|
{ lib,
|
||||||
python310Packages,
|
python311Packages,
|
||||||
fetchPypi,
|
fetchPypi,
|
||||||
python-pymatting,
|
python-pymatting,
|
||||||
python-opencv-headless
|
python-opencv-headless
|
||||||
}:
|
}:
|
||||||
python310Packages.buildPythonPackage rec {
|
python311Packages.buildPythonPackage rec {
|
||||||
pname = "rembg";
|
pname = "rembg";
|
||||||
version = "2.0.50";
|
version = "2.0.50";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
@ -14,12 +14,12 @@ python310Packages.buildPythonPackage rec {
|
||||||
hash = "sha256-bMt/GbplRawFZUqoXq37zAq1dribnu/ZlIYTuUIS+DU=";
|
hash = "sha256-bMt/GbplRawFZUqoXq37zAq1dribnu/ZlIYTuUIS+DU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with python310Packages; [
|
nativeBuildInputs = with python311Packages; [
|
||||||
poetry-core
|
poetry-core
|
||||||
setuptools
|
setuptools
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with python310Packages; [
|
propagatedBuildInputs = with python311Packages; [
|
||||||
numpy
|
numpy
|
||||||
onnxruntime
|
onnxruntime
|
||||||
python-opencv-headless
|
python-opencv-headless
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue