Skip to content

Instantly share code, notes, and snippets.

@nietzscheson
Created April 19, 2024 15:01
Show Gist options
  • Save nietzscheson/8c22e94b2f23adb1e4aa42c9ce645f42 to your computer and use it in GitHub Desktop.
Save nietzscheson/8c22e94b2f23adb1e4aa42c9ce645f42 to your computer and use it in GitHub Desktop.
{ 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 llama2:7b
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