Commit c16ae7fa authored by Marko's avatar Marko 🇪🇭
Browse files

try to add cudnn binary package (for pytorch)

parent adeb43bb
;;; This module extends GNU Guix and is licensed under the same terms, those
;;; of the GNU GPL version 3 or (at your option) any later version.
;;; However, note that this module provides packages for "non-free" software,
;;; which denies users the ability to study and modify it. These packages
;;; are detrimental to user freedom and to proper scientific review and
;;; experimentation. As such, we kindly invite you not to share it.
;;; Copyright © 2018, 2019, 2020 Inria
(define-module (non-free cudnn)
#:use-module (guix)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages elf)
#:use-module (gnu packages gcc)
#:use-module (ice-9 match))
(define (make-cudnn version origin)
(name "cudnn")
(version version)
(source origin)
(build-system gnu-build-system)
(outputs '("out"))
`(#:modules ((guix build utils)
(guix build gnu-build-system)
(ice-9 match))
;; Let's not publish or obtain substitutes for that.
#:substitutable? #f
#:strip-binaries? #f ;no need
;; XXX: This would check DT_RUNPATH, but patchelf populate DT_RPATH,
;; not DT_RUNPATH.
#:validate-runpath? #f
#:phases (modify-phases %standard-phases
(delete 'configure)
(delete 'check)
(delete 'build) ;; for now, delete maybe later we need to patchelf
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(libdir (string-append out "/lib"))
(includedir (string-append out "/include")))
;; Install libraries Don't install .a files to save disk space
(for-each (lambda (lib)
(install-file lib libdir))
(find-files (string-append "." "/lib64")
;; install include files
(copy-recursively (string-append "." "/include")
`(("patchelf" ,patchelf))) ;; unused for now
`(("gcc:lib" ,gcc "lib")))
"NVIDIA CUDA Deep Neural Network library, used by pytorch")
"This package provides a GPU-accelerated library of primitives for deep neural networks
for NVIDIA GPUs, which is proprietary.")
(home-page "")
(license #f)
(supported-systems '("x86_64-linux"))))
(define-syntax-rule (cudnn-source url hash)
;; stole url from arch linux :
(uri url)
(sha256 (base32 hash))
(method url-fetch)))
(define-public cudnn-8.0.5
(make-cudnn ""
(define-public cudnn cudnn-8.0.5)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment