Created
November 18, 2024 18:03
-
-
Save nietzscheson/cc361a6489270f347dd113b316639b75 to your computer and use it in GitHub Desktop.
Ollama on Nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
let | |
pythonEnv = pkgs.python311.withPackages (ps: [ | |
ps.pip | |
ps.debugpy | |
ps.ipython | |
ps.numpy | |
ps.setuptools | |
]); | |
in | |
pkgs.mkShell { | |
nativeBuildInputs = with pkgs; [ | |
cmake | |
poetry | |
jq | |
nodejs_20 | |
ollama | |
gcc | |
stdenv.cc.cc.lib | |
]; | |
buildInputs = [ | |
pythonEnv | |
]; | |
packages = with pkgs; [ | |
git | |
neovim | |
python311 | |
httpie | |
ruff | |
pre-commit | |
]; | |
GIT_EDITOR = "${pkgs.neovim}/bin/nvim"; | |
shellHook = '' | |
pyenv global system | |
export PATH=$PATH:${pythonEnv}/bin | |
poetry env use ${pythonEnv}/bin/python | |
ollama pull mistral | |
ollama pull nomic-embed-text | |
''; | |
LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment