From 20b6a552c957c28d8da5a836d0ef0ba846c4a3a4 Mon Sep 17 00:00:00 2001 From: Yadunand Prem Date: Tue, 23 Apr 2024 23:41:36 +0800 Subject: [PATCH] feat: update flake --- cs2109s/labs/flake.nix | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/cs2109s/labs/flake.nix b/cs2109s/labs/flake.nix index 9778b27..4c8e816 100644 --- a/cs2109s/labs/flake.nix +++ b/cs2109s/labs/flake.nix @@ -2,7 +2,7 @@ description = "A very basic flake"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -11,26 +11,31 @@ inherit system; config = { allowUnfree = true; - cudaSupport = true; }; - }; - in rec { + }; in rec { + overlays = [(final: prev: { + pythonPackagesExtensions = [(py-final: py-prev: { + torch = py-final.torch-bin; + torchvision = py-final.torchvision-bin; + torchaudio = py-final.torchaudio-bin; + })]; + })]; devShell = pkgs.mkShell { buildInputs = with pkgs; [ - cudaPackages.cudatoolkit - (python3.withPackages(ps: with ps; [ + (python3.withPackages(ps: with ps; + [ ipython jupyter numpy pandas - matplotlib - torch - scikit-learn - timeout-decorator - torchvision + matplotlib + torch + scikit-learn + timeout-decorator + torchvision + seaborn ])) ]; - shellHook = "jupyter notebook --ip='100.64.0.8'"; }; } );