I’m really struggling to figure out how to get CUDA 11 in Pytorch. It seems like no matter what combination of override I do, I always get 10.2. And 10.2 doesn’t work for my 3060ti. I’m on NixOS unstable, and the project is using a flake. The flake.nix is defined as:
{
description = "Project";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
config = {
allowUnfree = true;
cudaSupport = true;
};
};
in { devShell = import ./shell.nix { inherit pkgs; }; });
}
The shell.nix is defined as:
{ pkgs ? import <nixpkgs> { } }:
let
cudatoolkit = pkgs.cudaPackages.cudatoolkit_11;
cudnn = pkgs.cudnn_cudatoolkit_11;
nccl = pkgs.nccl_cudatoolkit_11;
magma = pkgs.magma.override { cudatoolkit = cudatoolkit; };
python = pkgs.python38.withPackages (ps:
with ps; [
(pytorch.override
{
cudaSupport = true;
cudatoolkit = cudatoolkit;
cudnn = cudnn;
nccl = nccl;
magma = magma;
})
pytorch-lightning
transformers
ipython
mypy
black
flake8
]);
in pkgs.mkShell {
buildInputs =
[ pkgs.linuxPackages.nvidia_x11 cudatoolkit cudnn nccl python magma ];
}
If anyone could help me out, I would really appreciate it. Each time I make changes to try something new I have to wait for Pytorch to recompile, which is incredibly slow.