Spaces:
Build error
Build error
File size: 2,113 Bytes
28451f7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
{
description = "INGP dev env";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
cudaSupport = true;
config.cudaVersion = "12";
};
};
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
gcc13
gdb
cmake
pkg-config
binutils
zlib
xorg.libX11.dev
xorg.libXi.dev
xorg.libXrandr.dev
xorg.libXinerama.dev
xorg.libXcursor.dev
xorg.libXext.dev
xorg.libXfixes.dev
xorg.libXrender.dev
libGL
glew
vulkan-loader
vulkan-headers
vulkan-validation-layers
vulkan-extension-layer
vulkan-tools
python3
stdenv.cc.cc.lib
cudatoolkit
cudaPackages.cuda_cudart
cudaPackages.cuda_nvrtc
cudaPackages.cuda_nvtx
];
shellHook = ''
# Set GCC 13 as the default compiler
export CC="${pkgs.gcc13}/bin/gcc"
export CXX="${pkgs.gcc13}/bin/g++"
export PATH="${pkgs.gcc13}/bin:$PATH"
export CUDA_PATH="${pkgs.cudatoolkit}"
export CLANGD_CUDA_INCLUDE="${pkgs.cudatoolkit}"
export LD_LIBRARY_PATH="/run/opengl-driver/lib:${pkgs.zlib}/lib:${pkgs.stdenv.cc.cc.lib}/lib:''${LD_LIBRARY_PATH:-}"
export VULKAN_SDK="${pkgs.vulkan-loader}"
export VK_LAYER_PATH="${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d:${pkgs.vulkan-extension-layer}/share/vulkan/explicit_layer.d"
export VK_ICD_FILENAMES="/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json"
'';
};
}
);
}
|