added
This commit is contained in:
parent
b7ac282ab0
commit
61f75643a4
1 changed files with 49 additions and 0 deletions
49
modules/python.nix
Normal file
49
modules/python.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
customPkgs = import ../pkgs { inherit pkgs lib; };
|
||||||
|
in {
|
||||||
|
options.custom.python = {
|
||||||
|
enable = lib.mkEnableOption "System Python Env";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.custom.python.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(python311.withPackages (ps: with ps; [
|
||||||
|
virtualenv
|
||||||
|
(torch.override { cudaSupport = true; })
|
||||||
|
torchvision
|
||||||
|
torchaudio
|
||||||
|
ipython
|
||||||
|
i3ipc
|
||||||
|
xlib
|
||||||
|
six
|
||||||
|
psutil
|
||||||
|
pynvml
|
||||||
|
pyqtgraph
|
||||||
|
pyqt6
|
||||||
|
numpy
|
||||||
|
pandas
|
||||||
|
matplotlib
|
||||||
|
scipy
|
||||||
|
requests
|
||||||
|
click
|
||||||
|
typer
|
||||||
|
rich
|
||||||
|
pyyaml
|
||||||
|
pytz
|
||||||
|
onnxruntime
|
||||||
|
pillow
|
||||||
|
timm
|
||||||
|
] ++ [ customPkgs.python-rembg ]))
|
||||||
|
python3Packages.pip
|
||||||
|
uv
|
||||||
|
ruff
|
||||||
|
black
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue