| 2 Feb 2023 |
realjhol | just trying to understand the code - it seems like it was designed to be nice and flexible, I just can't see how to access the flexibility that I need! | 21:39:45 |
realjhol | looking at tensorRTDefaultVersions, it looks like it's hard coded to 8.4.0 for all versions of cuda right now - the TensorRT version is defined by the CUDA version with no opportunity to set it to anything else | 21:42:25 |
SomeoneSerge (back on matrix) | Hi! The attributes from the defaultBuild and allBuilds variables will end up in cudaPackages namespace (i.e. you can access it as (import <nixpkgs> { }).cudaPackages.tensorrt) For now you'd have to modify the table in your own fork of nixpkgs, but I don't see any reason we couldn't actually expose these tables so that they could be overridden by users Also this code maybe waits for somebody to simplify it:) | 21:49:23 |
realjhol | and how does one set the defaultBuild and allBuilds variables? | 21:51:16 |
realjhol | my for my needs I can do overrideAttrs on pkgs.cudaPackages.tensorrt derrivation, and just change the source and version | 21:51:37 |
SomeoneSerge (back on matrix) | For context, the piece was introduced in: https://github.com/NixOS/nixpkgs/pull/178397/ It used as a reference some of the extension.nix files from https://github.com/NixOS/nixpkgs/pull/167016 | 21:51:42 |
SomeoneSerge (back on matrix) | I think you'd have to just edit them in your own fork... :( | 21:53:14 |
realjhol | oh I see - ok | 21:53:27 |
realjhol | well it mat not be pretty, buth this deos give me what I need:
cudaPackages = pkgs.cudaPackages_11_4;
tensorrt = cudaPackages.tensorrt.overrideAttrs (old: let
fullVersion = "8.2.1.8";
fileVersionCuda = "11.4";
fileVersionCudnn = "8.2";
sha256 = "sha256-PpqcxK0OWuY3MX2STc3fZjgfTbBOJXHw8ubtWipR8kc=";
in rec {
pname = "cudatoolkit-${cudaPackages.cudatoolkit.majorVersion}-tensorrt";
version = fullVersion;
src = pkgs.requireFile rec {
name = "TensorRT-${fullVersion}.Linux.x86_64-gnu.cuda-${fileVersionCuda}.cudnn${fileVersionCudnn}.tar.gz";
inherit sha256;
message = ''
To use the TensorRT derivation, you must join the NVIDIA Developer Program and
download the ${version} Linux x86_64 TAR package for CUDA ${cudaPackages.cudaVersion} from
${old.meta.homepage}.
Once you have downloaded the file, add it to the store with the following
command, and try building this derivation again.
$ nix-store --add-fixed sha256 ${name}
'';
};
sourceRoot = "TensorRT-${version}";
# Tell autoPatchelf about runtime dependencies.
# (postFixup phase is run before autoPatchelfHook.)
postFixup =
let
mostOfVersion = builtins.concatStringsSep "."
(pkgs.lib.take 3 (pkgs.lib.versions.splitVersion version));
in
''
echo 'Patching RPATH of libnvinfer libs'
patchelf --debug --add-needed libnvinfer.so \
"$out/lib/libnvinfer.so.${mostOfVersion}" \
"$out/lib/libnvinfer_plugin.so.${mostOfVersion}" \
"$out/lib/libnvinfer_builder_resource.so.${mostOfVersion}"
'';
});
| 22:54:36 |
realjhol | it would be nice if cudaPackages.tensorrt had an override method so that I could override the version values without having to reimplement half of the derrivation | 22:55:27 |
SomeoneSerge (back on matrix) | If you're going to use nixpkgs packages that rely on tensorrt, you might also want to re-evaluate cudaPackages in an overlay to make sure they all use your version of tensorrt | 22:57:14 |
realjhol | hmm -- ok that makes sense | 22:57:57 |
SomeoneSerge (back on matrix) | There's an example in the manual, cf. the overrideScope' bit https://nixos.org/manual/nixpkgs/unstable/#cuda | 22:58:51 |
realjhol | thanks! - I'm out of time for today, but I'll take a look tomorrow | 22:59:28 |
SomeoneSerge (back on matrix) | Cheers! | 22:59:43 |
| 6 Feb 2023 |
tpw_rules | ignore this, just trying to get an unread notification to go away... | 18:11:06 |
hexa | left the threads beta, because unread notifications were driving me nuts | 19:43:58 |
SomeoneSerge (back on matrix) | does this message show up as a simple reply now? | 19:44:47 |
hexa | yes, it does | 19:44:54 |
tpw_rules | oh please tell me how to do that | 20:44:06 |
| 7 Feb 2023 |
hexa | https://github.com/NixOS/nixpkgs/pull/215091 | 17:32:46 |
| 8 Feb 2023 |
hexa | In reply to @tpw_rules:matrix.org oh please tell me how to do that in element labs settings there is a big leave button 😄 | 11:55:20 |
| 9 Feb 2023 |
| connor (he/him) joined the room. | 17:34:22 |
SomeoneSerge (back on matrix) | A recurring theme really: webkitgtk, plasma-desktop, &c &c depend on gst-plugins-bad, which depends on opencv, which depends on config.cudaSupport. Toggling config.cudaSupport -> rebuilding gst-plugins-bad -> rebuilding webkitgtk, and all of these rebuilds are false-positives in the sense, that just rewriting runpaths in gst-plugins-bad to point at the new (cuda-enabled) opencv would have probably worked just fine
https://matrix.to/#/!KqkRjyTEzAGRiZFBYT:nixos.org/$g1YvCdKTL93lLBfdCAs7VrHKtBzWEmgHvztNbbog0MU?via=nixos.org&via=matrix.org&via=tchncs.de
| 17:36:51 |
| 10 Feb 2023 |
| jv joined the room. | 12:52:42 |
| jv left the room. | 12:55:06 |
SomeoneSerge (back on matrix) | https://youtu.be/H3AQnlpxk0c?t=57 | 23:13:41 |
SomeoneSerge (back on matrix) | Note https://github.com/NixOS/nixpkgs/pull/215578 | 23:15:51 |
| 11 Feb 2023 |
| jv joined the room. | 05:30:10 |
jv | Hey, uhm, would this be the place I would talk about getting an nvidia gpu functional within a container? | 05:43:14 |