Skip to content

Instantly share code, notes, and snippets.

@johnrizzo1
Created November 20, 2024 03:00
Show Gist options
  • Save johnrizzo1/7dd72dd33183caaa3225c1489e076c03 to your computer and use it in GitHub Desktop.
Save johnrizzo1/7dd72dd33183caaa3225c1489e076c03 to your computer and use it in GitHub Desktop.
{ pkgs, lib, config, inputs, ... }:
{
packages =
let
# mypkgs = import inputs.nixpkgs-unstable {
mypkgs = import inputs.nixpkgs {
inherit (pkgs.stdenv) system;
config.allowUnfree = true;
config.cudaSupport = true;
};
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit (pkgs.stdenv) system;
config.allowUnfree = true;
config.cudaSupport = true;
};
in
with mypkgs; [
git
# nixpkgs-fmt
cudatoolkit
portaudio
(python3.withPackages (python-pkgs: with python-pkgs; [
accelerate
bitsandbytes
datasets
diffusers
ftfy
graphviz
ipykernel
ipympl
ipywidgets
jupyter-all
jupyter-server
jupyterlab
matplotlib
nltk
numpy
openai-whisper
pandas
peft
pip
pyaudio
python-dotenv
pyttsx3
requests
rich
scipy
seaborn
sounddevice
sqlalchemy
statsmodels
tensorboard
torch
torchaudio
torchvision
xformers
]))
pkgs-unstable.python311Packages.huggingface-hub
pkgs-unstable.python311Packages.langchain-community
pkgs-unstable.python311Packages.langchain-openai
pkgs-unstable.python311Packages.langchain-ollama
pkgs-unstable.python311Packages.langchain-core
pkgs-unstable.python311Packages.langchain-text-splitters
pkgs-unstable.python311Packages.langchainplus-sdk
pkgs-unstable.python311Packages.langgraph
pkgs-unstable.python311Packages.langgraph-checkpoint
pkgs-unstable.python311Packages.langgraph-checkpoint-postgres
pkgs-unstable.python311Packages.langgraph-checkpoint-sqlite
pkgs-unstable.python311Packages.llama-index
pkgs-unstable.python311Packages.llama-index-agent-openai
# pkgs-unstable.python311Packages.llama-index-tools-google
# pkgs-unstable.python311Packages.llama-index-tools-wikipedia
];
languages.nix.enable = true;
languages.python = {
enable = true;
uv.enable = true;
venv.enable = true;
venv.requirements = ./requirements.txt;
# ''
# bark
# imblearn
# sklearn
# ml_utils
# login_attempt_simulator
# stock_analysis
# visual_aids
# langchain-cli
# langchainplus-sdk
# '';
};
dotenv.enable = true;
difftastic.enable = true;
starship.enable = true;
enterShell = ''
git --version
python -c "import torch; print(f'Cuda Enabled: {torch.cuda.is_available()}')"
'';
# See full reference at https://devenv.sh/reference/options/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment