refactor: nix fmt classic to nix fmt
This commit is contained in:
parent
ca78adc858
commit
f9614371a3
57 changed files with 923 additions and 493 deletions
|
|
@ -1,7 +1,13 @@
|
|||
{ pkgs, lib, python ? pkgs.python312, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
python ? pkgs.python312,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
pythonWithAI = python.withPackages (ps:
|
||||
pythonWithAI = python.withPackages (
|
||||
ps:
|
||||
let
|
||||
basePackages = with ps; [
|
||||
accelerate
|
||||
|
|
@ -25,12 +31,28 @@ let
|
|||
tokenizers
|
||||
transformers
|
||||
];
|
||||
linuxOnlyPackages = lib.optionals pkgs.stdenv.isLinux
|
||||
(with ps; [ sentencepiece torch torchaudio torchvision ]);
|
||||
in basePackages ++ linuxOnlyPackages);
|
||||
in pkgs.mkShell {
|
||||
linuxOnlyPackages = lib.optionals pkgs.stdenv.isLinux (
|
||||
with ps;
|
||||
[
|
||||
sentencepiece
|
||||
torch
|
||||
torchaudio
|
||||
torchvision
|
||||
]
|
||||
);
|
||||
in
|
||||
basePackages ++ linuxOnlyPackages
|
||||
);
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "ai-notebook";
|
||||
packages = with pkgs; [ pythonWithAI uv git-lfs ruff pyright ];
|
||||
packages = with pkgs; [
|
||||
pythonWithAI
|
||||
uv
|
||||
git-lfs
|
||||
ruff
|
||||
pyright
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export UV_PYTHON="${pythonWithAI}/bin/python3"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue