about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-10-09 16:52:23 +0200
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-10-10 10:38:21 -0300
commit4d34cbeeced65607945be9af329b826794cb81b3 (patch)
treeb3fc1d5b1479e8f9620bd8f13ed022d9bd0af1d0 /pkgs
parent3d6868510d892a9329a68044784fb4f0b9480972 (diff)
cntk: drop
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/science/math/cntk/default.nix134
-rw-r--r--pkgs/development/python-modules/cntk/default.nix61
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix7
-rw-r--r--pkgs/top-level/python-aliases.nix1
-rw-r--r--pkgs/top-level/python-packages.nix2
6 files changed, 2 insertions, 204 deletions
diff --git a/pkgs/applications/science/math/cntk/default.nix b/pkgs/applications/science/math/cntk/default.nix
deleted file mode 100644
index 91d208a56ede8..0000000000000
--- a/pkgs/applications/science/math/cntk/default.nix
+++ /dev/null
@@ -1,134 +0,0 @@
-{ lib, stdenv, fetchFromGitHub, cmake
-, fetchpatch
-, openblas, blas, lapack, opencv3, libzip, boost, protobuf, mpi
-, onebitSGDSupport ? false
-, config
-, cudaSupport ? config.cudaSupport, cudaPackages ? { }, addOpenGLRunpath, cudatoolkit, nvidia_x11
-, cudnnSupport ? cudaSupport
-}:
-
-let
-  inherit (cudaPackages) cudatoolkit cudnn;
-in
-
-assert cudnnSupport -> cudaSupport;
-assert blas.implementation == "openblas" && lapack.implementation == "openblas";
-
-let
-  # Old specific version required for CNTK.
-  cub = fetchFromGitHub {
-    owner = "NVlabs";
-    repo = "cub";
-    rev = "1.7.4";
-    sha256 = "0ksd5n1lxqhm5l5cd2lps4cszhjkf6gmzahaycs7nxb06qci8c66";
-  };
-
-in stdenv.mkDerivation rec {
-  pname = "CNTK";
-  version = "2.7";
-
-  src = fetchFromGitHub {
-    owner = "Microsoft";
-    repo = "CNTK";
-    rev = "v${version}";
-    sha256 = "sha256-2rIrPJyvZhnM5EO6tNhF6ARTocfUHce4N0IZk/SZiaI=";
-    fetchSubmodules = true;
-  };
-
-  patches = [
-    # Fix build with protobuf 3.18+
-    # Remove with onnx submodule bump to 1.9+
-    (fetchpatch {
-      url = "https://github.com/onnx/onnx/commit/d3bc82770474761571f950347560d62a35d519d7.patch";
-      extraPrefix = "Source/CNTKv2LibraryDll/proto/onnx/onnx_repo/";
-      stripLen = 1;
-      sha256 = "00raqj8wx30b06ky6cdp5vvc1mrzs7hglyi6h58hchw5lhrwkzxp";
-    })
-  ];
-
-  postPatch = ''
-    # Fix build with protobuf 3.18+
-    substituteInPlace Source/CNTKv2LibraryDll/Serialization.cpp \
-      --replace 'SetTotalBytesLimit(INT_MAX, INT_MAX)' \
-                'SetTotalBytesLimit(INT_MAX)' \
-      --replace 'SetTotalBytesLimit(limit, limit)' \
-                'SetTotalBytesLimit(limit)'
-  '';
-
-  nativeBuildInputs = [ cmake ] ++ lib.optional cudaSupport addOpenGLRunpath;
-
-  # Force OpenMPI to use g++ in PATH.
-  OMPI_CXX = "g++";
-
-  # Uses some deprecated tensorflow functions
-  env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
-
-  buildInputs = [ openblas opencv3 libzip boost protobuf mpi ]
-             ++ lib.optional cudaSupport cudatoolkit
-             ++ lib.optional cudnnSupport cudnn;
-
-  configureFlags = [
-    "--with-opencv=${opencv3}"
-    "--with-libzip=${libzip.dev}"
-    "--with-openblas=${openblas.dev}"
-    "--with-boost=${boost.dev}"
-    "--with-protobuf=${protobuf}"
-    "--with-mpi=${mpi}"
-    "--cuda=${if cudaSupport then "yes" else "no"}"
-    # FIXME
-    "--asgd=no"
-  ] ++ lib.optionals cudaSupport [
-    "--with-cuda=${cudatoolkit}"
-    "--with-gdk-include=${cudatoolkit}/include"
-    "--with-gdk-nvml-lib=${nvidia_x11}/lib"
-    "--with-cub=${cub}"
-  ] ++ lib.optional onebitSGDSupport "--1bitsgd=yes";
-
-  configurePhase = ''
-    sed -i \
-      -e 's,^GIT_STATUS=.*,GIT_STATUS=,' \
-      -e 's,^GIT_COMMIT=.*,GIT_COMMIT=v${version},' \
-      -e 's,^GIT_BRANCH=.*,GIT_BRANCH=v${version},' \
-      -e 's,^BUILDER=.*,BUILDER=nixbld,' \
-      -e 's,^BUILDMACHINE=.*,BUILDMACHINE=machine,' \
-      -e 's,^BUILDPATH=.*,BUILDPATH=/homeless-shelter,' \
-      -e '/git does not exist/d' \
-      Tools/generate_build_info
-
-    patchShebangs .
-    mkdir build
-    cd build
-    ${lib.optionalString cudnnSupport ''
-      mkdir cuda
-      ln -s ${cudnn}/include cuda
-      export configureFlags="$configureFlags --with-cudnn=$PWD"
-    ''}
-
-    ../configure $configureFlags
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin
-    # Moving to make patchelf remove references later.
-    mv lib $out
-    cp bin/cntk $out/bin
-  '';
-
-  postFixup = lib.optionalString cudaSupport ''
-    for lib in $out/lib/*; do
-      addOpenGLRunpath "$lib"
-    done
-  '';
-
-  meta = with lib; {
-    homepage = "https://github.com/Microsoft/CNTK";
-    description = "An open source deep-learning toolkit";
-    license = if onebitSGDSupport then licenses.unfreeRedistributable else licenses.mit;
-    platforms = [ "x86_64-linux" ];
-    maintainers = with maintainers; [ abbradar ];
-    # Newer cub is included with cudatoolkit now and it breaks the build.
-    # https://github.com/Microsoft/CNTK/issues/3191
-    # broken = cudaSupport;
-    broken = true; # at 2022-11-23
-  };
-}
diff --git a/pkgs/development/python-modules/cntk/default.nix b/pkgs/development/python-modules/cntk/default.nix
deleted file mode 100644
index b1bba8cf1e0f3..0000000000000
--- a/pkgs/development/python-modules/cntk/default.nix
+++ /dev/null
@@ -1,61 +0,0 @@
-{ lib
-, buildPythonPackage
-, pkgs
-, numpy
-, scipy
-, mpi
-, enum34
-, protobuf
-, pip
-, python
-, swig
-}:
-
-let
-  cntk = pkgs.cntk;
-in
-buildPythonPackage {
-  inherit (cntk) name version src;
-
-  nativeBuildInputs = [ swig mpi ];
-  buildInputs = [ cntk mpi ];
-  propagatedBuildInputs = [ numpy scipy enum34 protobuf pip ];
-
-  CNTK_LIB_PATH = "${cntk}/lib";
-  CNTK_COMPONENT_VERSION = cntk.version;
-  CNTK_VERSION = cntk.version;
-  CNTK_VERSION_BANNER = cntk.version;
-
-  postPatch = ''
-    cd bindings/python
-    sed -i 's,"libmpi.so.12","${mpi}/lib/libmpi.so",g' cntk/train/distributed.py
-
-    # Remove distro and libs checks; they aren't compatible with NixOS and besides we guarantee
-    # compatibility by providing a package.
-    cat <<EOF > cntk/cntk_py_init.py
-    def cntk_check_distro_info():
-      pass
-    def cntk_check_libs():
-      pass
-    EOF
-  '';
-
-  postInstall = ''
-    rm -rf $out/${python.sitePackages}/cntk/libs
-    ln -s ${cntk}/lib $out/${python.sitePackages}/cntk/libs
-    # It's not installed for some reason.
-    cp cntk/cntk_py.py $out/${python.sitePackages}/cntk
-  '';
-
-  # Actual tests are broken.
-  checkPhase = ''
-    cd $NIX_BUILD_TOP
-    ${python.interpreter} -c "import cntk"
-  '';
-
-  meta = {
-    inherit (cntk.meta) homepage description license maintainers platforms;
-    # doesn't support Python 3.7
-    broken = lib.versionAtLeast python.version "3.7";
-  };
-}
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index e8a8f03a48415..2cc4a56855213 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -135,6 +135,7 @@ mapAliases ({
   crispyDoom = crispy-doom; # Added 2023-05-01
   clasp = clingo; # added 2022-12-22
   claws-mail-gtk3 = claws-mail; # Added 2021-07-10
+  cntk = throw "'cntk' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-10-09
   codimd = hedgedoc; # Added 2020-11-29
   inherit (libsForQt5.mauiPackages) communicator; # added 2022-05-17
   compton = throw "'compton' has been renamed to/replaced by 'picom'"; # Converted to throw 2023-09-10
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index d86b30b3a4de4..e7d25a49da571 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -40054,13 +40054,6 @@ with pkgs;
 
   caffeine-ng = callPackage ../tools/X11/caffeine-ng { };
 
-  cntk = callPackage ../applications/science/math/cntk {
-    stdenv = gcc7Stdenv;
-    inherit (linuxPackages) nvidia_x11;
-    opencv3 = opencv3WithoutCuda; # Used only for image loading.
-    inherit (config) cudaSupport;
-  };
-
   dap = callPackage ../applications/science/math/dap { };
 
   ecm = callPackage ../applications/science/math/ecm { };
diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix
index bf8e221fdfa46..32cf95500d49d 100644
--- a/pkgs/top-level/python-aliases.nix
+++ b/pkgs/top-level/python-aliases.nix
@@ -74,6 +74,7 @@ mapAliases ({
   carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18
   cchardet = faust-cchardet; # added 2023-03-02
   class-registry = phx-class-registry; # added 2021-10-05
+  cntk = throw "cntk has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-10-09
   codespell = throw "codespell has been promoted to a top-level attribute"; # Added 2022-10-02
   ColanderAlchemy = colanderalchemy; # added 2023-02-19
   CommonMark = commonmark; # added 2023-02-1
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 39dd6a6b11a92..eeb310dd886f0 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2149,8 +2149,6 @@ self: super: with self; {
 
   cmsis-svd = callPackage ../development/python-modules/cmsis-svd { };
 
-  cntk = callPackage ../development/python-modules/cntk { };
-
   cnvkit = callPackage ../development/python-modules/cnvkit { };
 
   co2signal = callPackage ../development/python-modules/co2signal { };