diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..874b59a --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1739206421, + "narHash": "sha256-PwQASeL2cGVmrtQYlrBur0U20Xy07uSWVnFup2PHnDs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "44534bc021b85c8d78e465021e21f33b856e2540", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ccfb748 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "Build Project Siren"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + }; + + outputs = { self, nixpkgs, ... }: let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in { + + Siren = pkgs.stdenv.mkDerivation { + + name = "Siren"; + + src = ./src; + + buildInputs = with pkgs; [ + (python311.withPackages (ps: with ps; [ + ollama + ])) + ]; + + buildPhase = '' + + ''; + + installPhase = '' + mkdir -p $out/bin + ''; + }; + + packages.${system}.default = self.Siren; + }; +} diff --git a/src/siren.py b/src/siren.py new file mode 100644 index 0000000..b5f2f69 --- /dev/null +++ b/src/siren.py @@ -0,0 +1,9 @@ +import ollama + +c = ollama.Client( + host='https://ollama.blunkall.us' + ) + +r = c.generate(model='llama3.2', prompt='say hello')['response'] + +print(r)