Unverified Commit 543546a7 authored by Connor Baker's avatar Connor Baker Committed by GitHub
Browse files

cudaPackages_{11,12_0,12_1,12_2,12_3,12_4,12_5}: drop (#434827)

parents 9da81013 5e733d73
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -12,11 +12,11 @@ Nixpkgs provides a number of CUDA package sets, each based on a different CUDA r
- `cudaPackages_x`: A major-versioned alias to the major-minor-versioned CUDA package set with the latest widely supported major CUDA release.
- `cudaPackages`: An unversioned alias to the major-versioned alias for the latest widely supported CUDA release. The package set referenced by this alias is also referred to as the "default" CUDA package set.

It is recommended to use the unversioned `cudaPackages` attribute. While versioned package sets are available (e.g., `cudaPackages_12_2`), they are periodically removed.
It is recommended to use the unversioned `cudaPackages` attribute. While versioned package sets are available (e.g., `cudaPackages_12_8`), they are periodically removed.

Here are two examples to illustrate the naming conventions:

- If `cudaPackages_12_8` is the latest release in the 12.x series, but core libraries like OpenCV or ONNX Runtime fail to build with it, `cudaPackages_12` may alias `cudaPackages_12_6` instead of `cudaPackages_12_8`.
- If `cudaPackages_12_9` is the latest release in the 12.x series, but core libraries like OpenCV or ONNX Runtime fail to build with it, `cudaPackages_12` may alias `cudaPackages_12_8` instead of `cudaPackages_12_9`.
- If `cudaPackages_13_1` is the latest release, but core libraries like PyTorch or Torch Vision fail to build with it, `cudaPackages` may alias `cudaPackages_12` instead of `cudaPackages_13`.

All CUDA package sets include common CUDA packages like `libcublas`, `cudnn`, `tensorrt`, and `nccl`.
@@ -146,7 +146,7 @@ These settings ensure that the CUDA setup hooks function as intended.
When using `callPackage`, you can choose to pass in a different variant, e.g. when a package requires a specific version of CUDA:

```nix
{ mypkg = callPackage { cudaPackages = cudaPackages_12_2; }; }
{ mypkg = callPackage { cudaPackages = cudaPackages_12_6; }; }
```

::: {.caution}
+2 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@

- `mongodb-6_0` was removed as it is end of life as of 2025-07-31.

- CUDA versions below 12.6 have been removed, as they are unmaintained upstream and depend on end‐of‐life compilers.

- `vmware-horizon-client` was renamed to `omnissa-horizon-client`, following [VMware's sale of their end-user business to Omnissa](https://www.omnissa.com/insights/introducing-omnissa-the-former-vmware-end-user-computing-business/). The binary has been renamed from `vmware-view` to `horizon-client`.

- `neovimUtils.makeNeovimConfig` now uses `customLuaRC` parameter instead of accepting `luaRcContent`. The old usage is deprecated but still works with a warning.
+6 −8
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
  gitUpdater,
  cudaSupport ? config.cudaSupport,
  cudaPackages ? { },
  llvmPackagesCuda ? llvmPackages,
  pythonSupport ? false,
}:
let
@@ -45,10 +44,6 @@ stdenv.mkDerivation (finalAttrs: {
    shopt -s globstar
    for cmakelists in **/CMakeLists.*; do
      sed -i "s/OpenSSL::OpenSSL/OpenSSL::SSL/g" $cmakelists
      ${lib.optionalString (cudaPackages.cudaOlder "11.8") ''
        sed -i 's/-gencode=arch=compute_89,code=sm_89//g' $cmakelists
        sed -i 's/-gencode=arch=compute_90,code=sm_90//g' $cmakelists
      ''}
    done
  '';

@@ -91,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: {
    # catboost requires clang 14+ for build, but does clang 12 for cuda build.
    # after bumping the default version of llvm, check for compatibility with the cuda backend and pin it.
    # see https://catboost.ai/en/docs/installation/build-environment-setup-for-cmake#compilers,-linkers-and-related-tools
    CUDAHOSTCXX = lib.optionalString cudaSupport "${llvmPackagesCuda.stdenv.cc}/bin/cc";
    CUDAHOSTCXX = lib.optionalString cudaSupport "${stdenv.cc}/bin/cc";
    NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isLinux "-fuse-ld=lld";
    NIX_LDFLAGS = "-lc -lm";
    NIX_CFLAGS_COMPILE = toString (
@@ -139,7 +134,10 @@ stdenv.mkDerivation (finalAttrs: {
      natsukium
    ];
    mainProgram = "catboost";
    broken =
      # See: <https://github.com/catboost/catboost/issues/2755>
      cudaSupport
      # /nix/store/hzxiynjmmj35fpy3jla7vcqwmzj9i449-Libsystem-1238.60.2/include/sys/_types/_mbstate_t.h:31:9: error: unknown type name '__darwin_mbstate_t'
    broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
      || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64);
  };
})
+0 −110
Original line number Diff line number Diff line
diff --git a/common/CudaWorker/DcgmDgemm.cpp b/common/CudaWorker/DcgmDgemm.cpp
index 8d33a3256e..6b3284258d 100644
--- a/common/CudaWorker/DcgmDgemm.cpp
+++ b/common/CudaWorker/DcgmDgemm.cpp
@@ -17,6 +17,7 @@
 
 #include <exception>
 #include <stdexcept>
+#include <cinttypes>
 
 #define CU_CHK(op)                                               \
     if (auto const status = op; status != CUBLAS_STATUS_SUCCESS) \
@@ -122,4 +123,4 @@
     return CUBLAS_STATUS_SUCCESS;
 }
 
-} // namespace DcgmNs
\ No newline at end of file
+} // namespace DcgmNs
diff --git a/common/DcgmError.h b/common/DcgmError.h
index 8638cdceb1..e8d817c0d4 100644
--- a/common/DcgmError.h
+++ b/common/DcgmError.h
@@ -17,6 +17,7 @@
 
 #include <sstream>
 #include <string>
+#include <cinttypes>
 
 #include <dcgm_agent.h>
 #include <dcgm_errors.h>
diff --git a/common/DcgmStringHelpers.cpp b/common/DcgmStringHelpers.cpp
index b41917e3b7..1fe63980c7 100644
--- a/common/DcgmStringHelpers.cpp
+++ b/common/DcgmStringHelpers.cpp
@@ -17,6 +17,7 @@
 
 #include <cstring>
 #include <string>
+#include <algorithm>
 
 /*****************************************************************************/
 void dcgmTokenizeString(const std::string &src, const std::string &delimiter, std::vector<std::string> &tokens)
diff --git a/dcgmi/CommandOutputController.cpp b/dcgmi/CommandOutputController.cpp
index 5057205564..8520171efa 100644
--- a/dcgmi/CommandOutputController.cpp
+++ b/dcgmi/CommandOutputController.cpp
@@ -24,6 +24,7 @@
 #include "dcgm_agent.h"
 #include <DcgmStringHelpers.h>
 #include <algorithm>
+#include <functional>
 #include <cstdarg>
 #include <iostream>
 #include <string>
diff --git a/dcgmi/Diag.h b/dcgmi/Diag.h
index a326f7b949..563fb3c9c0 100755
--- a/dcgmi/Diag.h
+++ b/dcgmi/Diag.h
@@ -24,6 +24,7 @@
 #define DIAG_H_
 
 #include <optional>
+#include <functional>
 
 #include "Command.h"
 #include "CommandOutputController.h"
diff --git a/hostengine/src/HostEngineOutput.cpp b/hostengine/src/HostEngineOutput.cpp
index 23c6ca9f54..798b83b3e4 100644
--- a/hostengine/src/HostEngineOutput.cpp
+++ b/hostengine/src/HostEngineOutput.cpp
@@ -20,6 +20,7 @@
 #include <iostream>
 #include <limits>
 #include <string_view>
+#include <unordered_map>
 
 namespace
 {
@@ -365,4 +366,4 @@
         }
     }
     os << std::endl;
-}
\ No newline at end of file
+}
diff --git a/nvvs/src/NvvsCommon.cpp b/nvvs/src/NvvsCommon.cpp
index 8f7888649b..1604d9dabe 100644
--- a/nvvs/src/NvvsCommon.cpp
+++ b/nvvs/src/NvvsCommon.cpp
@@ -15,6 +15,7 @@
  */
 #include <sstream>
 #include <stdexcept>
+#include <algorithm>
 #include <sys/stat.h>
 #include <sys/types.h>
 
diff --git a/sdk/nvidia/nvml/nvml_loader/nvml_loader.cpp b/sdk/nvidia/nvml/nvml_loader/nvml_loader.cpp
index 9eebeaf1c4..6e21201229 100644
--- a/sdk/nvidia/nvml/nvml_loader/nvml_loader.cpp
+++ b/sdk/nvidia/nvml/nvml_loader/nvml_loader.cpp
@@ -20,6 +20,7 @@
 
 #include <atomic>
 #include <mutex>
+#include <cstdlib>
 
 static void *g_nvmlLib                                     = 0;
 static std::atomic_uint32_t g_nvmlStaticLibResetHooksCount = 1;
+252 −0
Original line number Diff line number Diff line
diff --git a/common/LsHw.cpp b/common/LsHw.cpp
index 8d0f35cd89..12fe26957f 100644
--- a/common/LsHw.cpp
+++ b/common/LsHw.cpp
@@ -145,7 +145,7 @@
 {
     static std::string const cmd = "lshw -json";
     std::string cmdOutput;
-    static std::array<std::string, 2> const cmdPathPrefix { "/usr/bin/", "/usr/sbin/" };
+    static std::array<std::string, 1> const cmdPathPrefix { "@lshw@/bin/" };
 
     dcgmReturn_t result = DCGM_ST_OK;
     for (auto const &prefix : cmdPathPrefix)
@@ -162,4 +162,4 @@
     }
 
     return cmdOutput;
-}
\ No newline at end of file
+}
diff --git a/common/tests/LsHwTests.cpp b/common/tests/LsHwTests.cpp
index edb65e599e..5950fb8d9e 100644
--- a/common/tests/LsHwTests.cpp
+++ b/common/tests/LsHwTests.cpp
@@ -609,7 +609,7 @@
         std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
         checker->MockIsRoot(true);
         std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
-        runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwMultipleCpusAbridgedValidJson);
+        runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwMultipleCpusAbridgedValidJson);
 
         LsHw lshw;
         lshw.SetChecker(std::move(checker));
@@ -626,7 +626,7 @@
         std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
         checker->MockIsRoot(true);
         std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
-        runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwSingleCpuAbridgedValidJson);
+        runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwSingleCpuAbridgedValidJson);
 
         LsHw lshw;
         lshw.SetChecker(std::move(checker));
@@ -642,7 +642,7 @@
         std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
         checker->MockIsRoot(true);
         std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
-        runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwSingleCpuNoSerialNumberAbridgedValidJson);
+        runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwSingleCpuNoSerialNumberAbridgedValidJson);
 
         LsHw lshw;
         lshw.SetChecker(std::move(checker));
@@ -658,7 +658,7 @@
         std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
         checker->MockIsRoot(true);
         std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
-        runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwSingleNonNvidiaCpuAbridgedValidJson);
+        runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwSingleNonNvidiaCpuAbridgedValidJson);
 
         LsHw lshw;
         lshw.SetChecker(std::move(checker));
@@ -673,7 +673,7 @@
         std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
         checker->MockIsRoot(true);
         std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
-        runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwIncorrectIdValueTypeJson);
+        runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwIncorrectIdValueTypeJson);
 
         LsHw lshw;
         lshw.SetChecker(std::move(checker));
@@ -687,7 +687,7 @@
         std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
         checker->MockIsRoot(true);
         std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
-        runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwMissingCpuJson);
+        runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwMissingCpuJson);
 
         LsHw lshw;
         lshw.SetChecker(std::move(checker));
@@ -702,7 +702,7 @@
         std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
         checker->MockIsRoot(true);
         std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
-        runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwBadSyntaxJson);
+        runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwBadSyntaxJson);
 
         LsHw lshw;
         lshw.SetChecker(std::move(checker));
@@ -716,6 +716,7 @@
 {
     SECTION("Will try /usr/sbin/")
     {
+        SKIP("Nixpkgs patches this out");
         std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
         checker->MockIsRoot(true);
         std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
@@ -730,4 +731,4 @@
         REQUIRE(cpuSerials.value()[0] == "0x000000017820B1C80400000015FF81C0");
         REQUIRE(cpuSerials.value()[1] == "0x000000017820B1C8040000000A0200C0");
     }
-}
\ No newline at end of file
+}
diff --git a/modules/diag/DcgmDiagManager.cpp b/modules/diag/DcgmDiagManager.cpp
index d0a75dcede..ccd4347719 100644
--- a/modules/diag/DcgmDiagManager.cpp
+++ b/modules/diag/DcgmDiagManager.cpp
@@ -253,7 +253,7 @@
     int result;
 
     // Default NVVS binary path
-    cmd = "/usr/libexec/datacenter-gpu-manager-4/nvvs";
+    cmd = "@dcgm_out@/libexec/datacenter-gpu-manager-4/nvvs";
 
     // Check for NVVS binary path enviroment variable
     value = std::getenv("NVVS_BIN_PATH");
diff --git a/modules/mndiag/dcgm_mndiag_structs.hpp b/modules/mndiag/dcgm_mndiag_structs.hpp
index 40e61a8fd0..7e43ce8bed 100644
--- a/modules/mndiag/dcgm_mndiag_structs.hpp
+++ b/modules/mndiag/dcgm_mndiag_structs.hpp
@@ -33,8 +33,8 @@
 constexpr std::string_view ENV_ALLOW_RUN_AS_ROOT = "DCGM_MPIRUN_ALLOW_RUN_AS_ROOT";
 
 // Default paths
-constexpr std::string_view DEFAULT_MPIRUN_PATH     = "/usr/bin/mpirun";
-constexpr std::string_view DEFAULT_MNUBERGEMM_PATH = "/usr/libexec/datacenter-gpu-manager-4/plugins/cuda12/mnubergemm";
+constexpr std::string_view DEFAULT_MPIRUN_PATH     = "@mpi@/bin/mpirun";
+constexpr std::string_view DEFAULT_MNUBERGEMM_PATH = "@dcgm_out@/libexec/datacenter-gpu-manager-4/plugins/cuda12/mnubergemm";
 } //namespace MnDiagConstants
 
 // Message types
diff --git a/modules/mndiag/tests/MnDiagManagerTests.cpp b/modules/mndiag/tests/MnDiagManagerTests.cpp
index 40dbda3b72..5ec8dafa1c 100644
--- a/modules/mndiag/tests/MnDiagManagerTests.cpp
+++ b/modules/mndiag/tests/MnDiagManagerTests.cpp
@@ -2228,7 +2228,7 @@
         mockStateMachine->SetMnubergemmPathCallback([&capturedPath](std::string const &path) { capturedPath = path; });
 
         // Set env to custom path
-        std::string customPath = "/bin/true";
+        std::string customPath = "@coreutils@/bin/true";
         setenv(MnDiagConstants::ENV_MNUBERGEMM_PATH.data(), customPath.c_str(), 1);
 
         auto mockCoreProxy = std::make_unique<MockDcgmCoreProxy>();
@@ -3112,7 +3112,7 @@
     {
         // Save current environment state
         auto savedPath         = saveEnvVar(MnDiagConstants::ENV_MNUBERGEMM_PATH.data());
-        std::string customPath = "/bin/true";
+        std::string customPath = "@coreutils@/bin/true";
         setenv(MnDiagConstants::ENV_MNUBERGEMM_PATH.data(), customPath.c_str(), 1);
 
         // Setup mock DCGM API with callback to inspect request
@@ -3251,7 +3251,7 @@
         auto savedPath = saveEnvVar(MnDiagConstants::ENV_MNUBERGEMM_PATH.data());
 
         // Use a known executable that exists
-        std::string customPath = "/bin/true";
+        std::string customPath = "@coreutils@/bin/true";
         setenv(MnDiagConstants::ENV_MNUBERGEMM_PATH.data(), customPath.c_str(), 1);
 
         // Call the method and verify path
diff --git a/modules/mndiag/tests/MnDiagProcessUtilsTests.cpp b/modules/mndiag/tests/MnDiagProcessUtilsTests.cpp
index 633e327c42..168ed91db2 100644
--- a/modules/mndiag/tests/MnDiagProcessUtilsTests.cpp
+++ b/modules/mndiag/tests/MnDiagProcessUtilsTests.cpp
@@ -71,7 +71,7 @@
     {
         // Start a long-running process
         DcgmNs::Common::Subprocess::ChildProcessBuilder builder;
-        builder.SetExecutable("/bin/sleep").AddArg("0.5");
+        builder.SetExecutable("@coreutils@/bin/sleep").AddArg("0.5");
 
         IoContext ioContext {};
         auto process = std::make_unique<DcgmNs::Common::Subprocess::ChildProcess>(builder.Build(ioContext));
@@ -155,4 +155,4 @@
 
         REQUIRE(result.empty());
     }
-}
\ No newline at end of file
+}
diff --git a/modules/mndiag/tests/MpiRunnerTests.cpp b/modules/mndiag/tests/MpiRunnerTests.cpp
index 526c80fd47..1e8596d3b7 100755
--- a/modules/mndiag/tests/MpiRunnerTests.cpp
+++ b/modules/mndiag/tests/MpiRunnerTests.cpp
@@ -60,7 +60,7 @@
 
     std::string GetMpiBinPath() const override
     {
-        return "/bin/bash";
+        return "@shell@";
     }
 
 private:
@@ -138,9 +138,9 @@
         runner.ConstructMpiCommand(&config);
 
         // Verify command construction
-        REQUIRE(runner.GetMpiBinPath() == "/bin/bash");
+        REQUIRE(runner.GetMpiBinPath() == "@shell@");
         std::string fullCommand = runner.GetLastCommand();
-        REQUIRE(fullCommand.find("/bin/bash -c") != std::string::npos);
+        REQUIRE(fullCommand.find("@shell@ -c") != std::string::npos);
         REQUIRE(fullCommand.find("sleep 1") != std::string::npos);
         REQUIRE(fullCommand.find("Output from sleep process") != std::string::npos);
 
@@ -244,4 +244,4 @@
         // Test with invalid parameter (null pointer)
         REQUIRE(runner.PopulateResponse(nullptr, nodeInfoMap_t()) == DCGM_ST_BADPARAM);
     }
-}
\ No newline at end of file
+}
diff --git a/modules/sysmon/DcgmCpuTopology.cpp b/modules/sysmon/DcgmCpuTopology.cpp
index 786d3877fc..ccbeccc81d 100644
--- a/modules/sysmon/DcgmCpuTopology.cpp
+++ b/modules/sysmon/DcgmCpuTopology.cpp
@@ -136,7 +136,7 @@
 {
     static std::string cmd = "lscpu --json";
     std::string cmdOutput;
-    static std::array<std::string, 2> cmdPathPrefix = { "/usr/bin/", "/usr/sbin/" };
+    static std::array<std::string, 1> cmdPathPrefix = { "@util-linux@/bin/" };
 
     dcgmReturn_t result = DCGM_ST_OK;
     for (auto const &prefix : cmdPathPrefix)
diff --git a/nvvs/plugin_src/nvbandwidth/NVBandwidthPlugin.cpp b/nvvs/plugin_src/nvbandwidth/NVBandwidthPlugin.cpp
index 261bba4490..4d439ad452 100644
--- a/nvvs/plugin_src/nvbandwidth/NVBandwidthPlugin.cpp
+++ b/nvvs/plugin_src/nvbandwidth/NVBandwidthPlugin.cpp
@@ -238,7 +238,7 @@
     std::vector<std::string> const search_paths
         = { GetCurrentModuleLocation(),
             fmt::format("./apps/nvvs/plugins/cuda{}", m_cudaDriverMajorVersion),
-            fmt::format("/usr/libexec/datacenter-gpu-manager-4/plugins/cuda{}", m_cudaDriverMajorVersion),
+            fmt::format("@dcgm_out@/libexec/datacenter-gpu-manager-4/plugins/cuda{}", m_cudaDriverMajorVersion),
             GetNvvsBinCheckPath(m_cudaDriverMajorVersion) };
     std::stringstream path_buf;
 
diff --git a/testing/TestDiagManager.cpp b/testing/TestDiagManager.cpp
index 8087123a49..a6333b3a3d 100644
--- a/testing/TestDiagManager.cpp
+++ b/testing/TestDiagManager.cpp
@@ -236,7 +236,7 @@
     if (nvvsPathEnv)
         nvvsBinPath = std::string(nvvsPathEnv) + "/nvvs";
     else
-        nvvsBinPath = "/usr/libexec/datacenter-gpu-manager-4/nvvs";
+        nvvsBinPath = "@dcgm_out@/libexec/datacenter-gpu-manager-4/nvvs";
 
     std::string diagResponseVersionArg = fmt::format("--response-version {}", dcgmDiagResponse_version12);
     expected.push_back(nvvsBinPath + " --channel-fd 3 " + diagResponseVersionArg
Loading