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
|
||||
jdt-language-server
|
||||
python3Packages.pip
|
||||
(python310.withPackages (ps:
|
||||
(python311.withPackages (ps:
|
||||
with ps;
|
||||
[
|
||||
virtualenv
|
||||
torch-bin
|
||||
torchvision-bin
|
||||
torchaudio-bin
|
||||
ipython
|
||||
i3ipc
|
||||
xlib
|
||||
|
|
@ -114,12 +117,7 @@ in {
|
|||
starship
|
||||
flameshot
|
||||
yarn
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages.eslint
|
||||
nodePackages.prettier
|
||||
nodePackages.vitest
|
||||
nodePackages.pg
|
||||
nodePackages.sqlite3
|
||||
mpv
|
||||
httpie
|
||||
wrk
|
||||
nodePackages.pnpm
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
./steam.nix
|
||||
./timezone.nix
|
||||
./user.nix
|
||||
./torch.nix
|
||||
];
|
||||
|
||||
# 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
|
||||
python-opencv-headless = pkgs.callPackage ./python-opencv-headless {
|
||||
inherit (pkgs) lib fetchurl;
|
||||
python310Packages = pkgs.python310.pkgs;
|
||||
python311Packages = pkgs.python311.pkgs;
|
||||
};
|
||||
|
||||
python-pymatting = pkgs.callPackage ./python-pymatting {
|
||||
inherit (pkgs) lib fetchPypi;
|
||||
python310Packages = pkgs.python310.pkgs;
|
||||
python311Packages = pkgs.python311.pkgs;
|
||||
};
|
||||
|
||||
python-rembg = pkgs.callPackage ./python-rembg {
|
||||
inherit (pkgs) lib fetchPypi;
|
||||
inherit python-pymatting python-opencv-headless;
|
||||
python310Packages = pkgs.python310.pkgs;
|
||||
python311Packages = pkgs.python311.pkgs;
|
||||
};
|
||||
in {
|
||||
fish-rust = pkgs.callPackage ./fish-rust {};
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ rustPlatform.buildRustPackage rec {
|
|||
};
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses gettext ];
|
||||
nativeBuildInputs = with python3Packages; [ sphinx sphinx_rtd_theme ];
|
||||
buildInputs = [ncurses gettext];
|
||||
nativeBuildInputs = with python3Packages; [sphinx sphinx_rtd_theme];
|
||||
|
||||
preBuild = ''
|
||||
export FISH_BUILD_VERSION="${version}"
|
||||
|
|
@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec {
|
|||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
mainProgram = "fish";
|
||||
maintainers = [ "Cobray" ];
|
||||
maintainers = ["Cobray"];
|
||||
};
|
||||
|
||||
passthru.shellPath = "/bin/fish";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{lib, python310Packages, fetchurl}:
|
||||
{lib, python311Packages, fetchurl}:
|
||||
|
||||
python310Packages.buildPythonPackage rec {
|
||||
python311Packages.buildPythonPackage rec {
|
||||
pname = "opencv-python-headless";
|
||||
version = "4.9.0.80";
|
||||
format = "wheel";
|
||||
|
|
@ -10,7 +10,7 @@ python310Packages.buildPythonPackage rec {
|
|||
sha256 = "976656362d68d9f40a5c66f83901430538002465f7db59142784f3893918f3df";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python310Packages; [
|
||||
propagatedBuildInputs = with python311Packages; [
|
||||
numpy
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
lib,
|
||||
python310Packages,
|
||||
python311Packages,
|
||||
fetchPypi,
|
||||
}:
|
||||
python310Packages.buildPythonPackage rec {
|
||||
python311Packages.buildPythonPackage rec {
|
||||
pname = "pymatting";
|
||||
version = "1.1.13";
|
||||
format = "pyproject";
|
||||
|
|
@ -13,12 +13,12 @@ python310Packages.buildPythonPackage rec {
|
|||
hash = "sha256-LNt8S++s3e9Netwt6ONKJy3mOdYIrlwKCGE9+kJTgQE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python310Packages; [
|
||||
nativeBuildInputs = with python311Packages; [
|
||||
setuptools
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python310Packages; [
|
||||
propagatedBuildInputs = with python311Packages; [
|
||||
numpy
|
||||
scipy
|
||||
pillow
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{ lib,
|
||||
python310Packages,
|
||||
python311Packages,
|
||||
fetchPypi,
|
||||
python-pymatting,
|
||||
python-opencv-headless
|
||||
}:
|
||||
python310Packages.buildPythonPackage rec {
|
||||
python311Packages.buildPythonPackage rec {
|
||||
pname = "rembg";
|
||||
version = "2.0.50";
|
||||
format = "pyproject";
|
||||
|
|
@ -14,12 +14,12 @@ python310Packages.buildPythonPackage rec {
|
|||
hash = "sha256-bMt/GbplRawFZUqoXq37zAq1dribnu/ZlIYTuUIS+DU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python310Packages; [
|
||||
nativeBuildInputs = with python311Packages; [
|
||||
poetry-core
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python310Packages; [
|
||||
propagatedBuildInputs = with python311Packages; [
|
||||
numpy
|
||||
onnxruntime
|
||||
python-opencv-headless
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue