Hello. I’m a newbie and I’m super confused about how even to formulate my question. A third of my confusion comes from not fully understanding how to properly configure things, and the other two thirds is about nvidia’s dependency infrastructure.
I figured out how to add it to my shell.nix as a build input, but I need guidance how to configure cuda to use the driver provided by nixGL. Could you show me from what I could start?
with import <nixpkgs> {
config.allowUnfree = true;
config.cudaSupport = true;
config.cudnnSupport = true;
};
let
nixGL = fetchTarball "https://github.com/guibou/nixGL/archive/master.tar.gz";
myNixGL = (import "${nixGL}/default.nix" {
nvidiaVersion = "440.64.00";
nvidiaHash = "08yln39l82fi5hmn06xxi3sl6zb4fgshhhq3m42ksiglradjd0ah";
inherit pkgs;
}).nixGLNvidia;
pythonEnv = python37.withPackages (ps: with ps; [
## nothing here yet
]);
in mkShell {
buildInputs = [
python37
pythonEnv
linuxPackages.nvidia_x11
cudatoolkit_10_1
cudnn_cudatoolkit_10_1
## TODO: configure everything to use the driver version mentioned above
];
shellHook = ''
export CUDA_HOME=${pkgs.cudatoolkit_10_1}
export PATH=${pkgs.cudatoolkit_10_1}/nsight-compute-2019.4.0:$(nixGLNvidia printenv PATH):${myNixGL}/bin
export LD_LIBRARY_PATH=$(nixGLNvidia printenv LD_LIBRARY_PATH)
'';
}
Do I understand correctly that $(nixGLNvidia printenv LD_LIBRARY_PATH) works when it’s installed with nix-env -iA, and to make it work in shell.nix without installing it we should use something like this?
Ah, ok. It’s twice as embarrassing now, haha, as I can’t fully comprehend both the documentation of nix and the limitations of the nixGL utility. Thanks for opening the ticket. Can I help anyhow? I could at least pay for an azure nc6 instance, it comes with an nvidia gpu, and costs around $0.50 per hour.