-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[draft] add direnv, nix configs, and uv lock file
- Loading branch information
1 parent
063291d
commit ac9b183
Showing
3 changed files
with
4,047 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
layout python | ||
# use 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ pkgs ? import <nixpkgs> { config = { allowUnfree = true; }; } }: | ||
|
||
(pkgs.buildFHSEnv { | ||
name = "dottxt-ai"; | ||
targetPkgs = pkgs: with pkgs; [ | ||
autoconf | ||
binutils | ||
cmake | ||
cudatoolkit | ||
curl | ||
freeglut | ||
gcc13 | ||
git | ||
gitRepo | ||
gnumake | ||
gnupg | ||
gperf | ||
libGL | ||
libGLU | ||
linuxPackages.nvidia_x11 | ||
m4 | ||
ncurses5 | ||
procps | ||
python3Packages.numpy | ||
python3Packages.pytorch | ||
python3Packages.pytorch | ||
python3Packages.torch | ||
python3Packages.xformers | ||
stdenv.cc | ||
unzip | ||
util-linux | ||
uv | ||
xorg.libX11 | ||
xorg.libXext | ||
xorg.libXi | ||
xorg.libXmu | ||
xorg.libXrandr | ||
xorg.libXv | ||
zlib | ||
]; | ||
|
||
multiPkgs = pkgs: with pkgs; [ zlib ]; | ||
|
||
runScript = "bash"; | ||
|
||
profile = '' | ||
# CUDA paths | ||
export CUDA_HOME=${pkgs.cudatoolkit} | ||
export CUDA_PATH=${pkgs.cudatoolkit} | ||
# Ensure proper binary paths are included | ||
export PATH=${pkgs.gcc13}/bin:${pkgs.cudatoolkit}/bin:$PATH | ||
# Set library paths, including additional directories for CUPTI | ||
export LD_LIBRARY_PATH=${pkgs.cudatoolkit}/lib64:${pkgs.cudatoolkit}/extras/CUPTI/lib64:${pkgs.linuxPackages.nvidia_x11}/lib:$LD_LIBRARY_PATH | ||
# Add static library paths to EXTRA_LDFLAGS for the linker | ||
export EXTRA_LDFLAGS="-L${pkgs.cudatoolkit}/lib64 -L${pkgs.cudatoolkit}/extras/CUPTI/lib64 -L${pkgs.linuxPackages.nvidia_x11}/lib -L${pkgs.cudatoolkit}/libdevice $EXTRA_LDFLAGS" | ||
export EXTRA_CCFLAGS="-I${pkgs.cudatoolkit}/include $EXTRA_CCFLAGS" | ||
# Set CMake paths | ||
export CMAKE_PREFIX_PATH=${pkgs.cudatoolkit}:${pkgs.linuxPackages.nvidia_x11}:$CMAKE_PREFIX_PATH | ||
# C++ and CC flags | ||
export CXXFLAGS="--std=c++17 $EXTRA_CCFLAGS" | ||
export CC=${pkgs.gcc13}/bin/gcc | ||
export CXX=${pkgs.gcc13}/bin/g++ | ||
# NVCC flags to use the right compiler | ||
export NVCC_FLAGS="-ccbin ${pkgs.gcc13}/bin/gcc" | ||
''; | ||
|
||
structuredAttrs__ = { | ||
stdenv = pkgs.stdenv.overrideCC pkgs.stdenv.cc pkgs.gcc13; | ||
}; | ||
}).env |
Oops, something went wrong.