Blender: Difference between revisions

Smudgebun (talk | contribs)
HIP: Moved some non-Blender-specific information to AMD GPU, linked to there for more
Smudgebun (talk | contribs)
The cudaSupport Flag: Moved some non-Blender-specific information to the CUDA page, and added a link to that section. Clarified build information.
Line 76: Line 76:


==== The cudaSupport Flag ====
==== The cudaSupport Flag ====
Whether a compatible package is built with CUDA support is managed by the <code>cudaSupport</code> flag enabled. This can either be done with a global flag
Whether a compatible package is built with CUDA support is managed by the <code>cudaSupport</code> flag enabled.


<syntaxhighlight lang="nix"> nixpkgs.config.cudaSupport = true; </syntaxhighlight>
The following example shows how to override specifically the Blender package for CUDA support, for general information on the topic see: [[CUDA#Enabling CUDA In Packages|Enabling CUDA In Packages]].
 
Or by overriding specifically the Blender package.


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 89: Line 87:
</syntaxhighlight>
</syntaxhighlight>


It's important to note that any package installed with the <code>cudaSupport</code> flag enabled that is CUDA-compatible will be compiled from source, as Hydra does not build (and therefore cache.nixos.org does not cache) with CUDA support enabled. With larger programs like Blender this can be very resource-intensive, so it is recommended to limit the number of cores or jobs that the process will take with the <code>--max-jobs</code> / <code>-j</code> and <code>--cores</code> flags when calling for example <code>nix-shell</code> or <code>nixos-rebuild</code>. This is also why it is recommended to only enable <code>cudaSupport</code> for the programs you need it for.
NixOS Foundation does not cache CUDA versions of packages because of the unfree license. This means if you do not have the [[CUDA#Setting up CUDA Binary Cache|CUDA Binary Cache]] set up, your machine will be compiling Blender from source. Compiling Blender is very resource-intensive, so if you are unable to use the CUDA Cache, it is recommended to limit the number of cores or jobs that the process will take with the <code>--max-jobs</code> / <code>-j</code> and <code>--cores</code> flags whenever calling a command that will be building Blender, see: [https://github.com/NixOS/nix/blob/master/doc/manual/source/advanced-topics/cores-vs-jobs.md Tuning Cores & Jobs] for more information.


==== Community Flakes ====
==== Community Flakes ====