[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/70: gnu: liblantern: Update to 0.11.0-1.4d83bd0.
From: |
guix-commits |
Subject: |
09/70: gnu: liblantern: Update to 0.11.0-1.4d83bd0. |
Date: |
Thu, 28 Dec 2023 03:35:42 -0500 (EST) |
rekado pushed a commit to branch r-updates
in repository guix.
commit dcad478d7e1a7c17657684a2ef787a1e7403f441
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu Dec 28 00:04:56 2023 +0100
gnu: liblantern: Update to 0.11.0-1.4d83bd0.
* gnu/packages/machine-learning.scm (liblantern): Update to
0.11.0-1.4d83bd0.
Change-Id: I04ac3d64df8ec3b4ba628886640020a24361f4e3
---
gnu/packages/machine-learning.scm | 132 ++++++++++++++++++++------------------
1 file changed, 68 insertions(+), 64 deletions(-)
diff --git a/gnu/packages/machine-learning.scm
b/gnu/packages/machine-learning.scm
index 3ddd56f69b..14fc2a0a72 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4550,70 +4550,74 @@ of Hidden Markov Models.")
;; Keep this in sync with the r-torch package.
(define-public liblantern
- (package
- (name "liblantern")
- (version "0.10.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/mlverse/torch")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "12480fac9xq7rgw0q5f2cnvmakhakjsnq1gvh2ncjfwxz34n8fl7"))))
- (build-system cmake-build-system)
- (arguments
- (list
- #:tests? #false ;no test target
- #:phases
- (let ((python-version (version-major+minor (package-version python))))
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "src/lantern")))
- (add-after 'chdir 'do-not-download-binaries
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "CMakeLists.txt"
- (("find_package\\(Torch.*") "set(TORCH_CXX_FLAGS
\"-ltorch\")\n")
- (("retrieve_lib\\(.*") ""))
- (let ((site-packages (string-append "/lib/python"
- #$python-version
- "/site-packages")))
- (setenv "LIBRARY_PATH"
- (string-append
- (search-input-directory
- inputs (string-append site-packages "/torch/lib"))
- ":" (or (getenv "LIBRARY_PATH") "")))
- (setenv "CPLUS_INCLUDE_PATH"
- (string-append
- (search-input-directory
- inputs (string-append
- site-packages
"/torch/include/torch/csrc/api/include/"))
- ":"
- (search-input-directory
- inputs (string-append site-packages
"/torch/include/"))
- ":"
- (or (getenv "CPLUS_INCLUDE_PATH") "")))
- (setenv "C_INCLUDE_PATH"
- (string-append
- (search-input-directory
- inputs (string-append site-packages
"/torch/include/"))
- ":"
- (or (getenv "C_INCLUDE_PATH") ""))))))
- (replace 'install
- (lambda _
- (install-file
- "../build/liblantern.so"
- (string-append #$output "/lib"))
- (copy-recursively
- "../lantern/include"
- (string-append #$output "/include"))))))))
- (inputs (list python-pytorch-for-r-torch))
- (home-page "https://github.com/mlverse/torch/")
- (synopsis "C API to libtorch")
- (description
- "Lantern provides a C API to the libtorch machine learning library.")
- (license license:expat)))
+ ;; There has been no release or tagged commit for r-torch 0.12.0. The
+ ;; selected commit corresponds to the 0.12.0 release.
+ (let ((commit "4d83bd087be581f7db321c27f55897ff021d2537")
+ (revision "1"))
+ (package
+ (name "liblantern")
+ (version (git-version "0.11.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mlverse/torch")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1xxc6vr7sr2mg0va0hc2fs4f6v5b78mx43dp2shzzbcgw90mgpvk"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #false ;no test target
+ #:phases
+ (let ((python-version (version-major+minor (package-version python))))
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "src/lantern")))
+ (add-after 'chdir 'do-not-download-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "CMakeLists.txt"
+ (("find_package\\(Torch.*") "set(TORCH_CXX_FLAGS
\"-ltorch\")\n")
+ (("retrieve_lib\\(.*") ""))
+ (let ((site-packages (string-append "/lib/python"
+ #$python-version
+ "/site-packages")))
+ (setenv "LIBRARY_PATH"
+ (string-append
+ (search-input-directory
+ inputs (string-append site-packages
"/torch/lib"))
+ ":" (or (getenv "LIBRARY_PATH") "")))
+ (setenv "CPLUS_INCLUDE_PATH"
+ (string-append
+ (search-input-directory
+ inputs (string-append
+ site-packages
"/torch/include/torch/csrc/api/include/"))
+ ":"
+ (search-input-directory
+ inputs (string-append site-packages
"/torch/include/"))
+ ":"
+ (or (getenv "CPLUS_INCLUDE_PATH") "")))
+ (setenv "C_INCLUDE_PATH"
+ (string-append
+ (search-input-directory
+ inputs (string-append site-packages
"/torch/include/"))
+ ":"
+ (or (getenv "C_INCLUDE_PATH") ""))))))
+ (replace 'install
+ (lambda _
+ (install-file
+ "../build/liblantern.so"
+ (string-append #$output "/lib"))
+ (copy-recursively
+ "../lantern/include"
+ (string-append #$output "/include"))))))))
+ (inputs (list python-pytorch-for-r-torch))
+ (home-page "https://github.com/mlverse/torch/")
+ (synopsis "C API to libtorch")
+ (description
+ "Lantern provides a C API to the libtorch machine learning library.")
+ (license license:expat))))
(define-public python-lap
(package
- branch r-updates created (now 6ee6a4cfb5), guix-commits, 2023/12/28
- 01/70: gnu: r-littler: Update to 0.3.19., guix-commits, 2023/12/28
- 03/70: gnu: Add xnnpack-for-torch2., guix-commits, 2023/12/28
- 02/70: gnu: r-rmpi: Update to 0.7-2., guix-commits, 2023/12/28
- 04/70: gnu: Add r-safetensors., guix-commits, 2023/12/28
- 05/70: gnu: python-protobuf: Update to 3.20.2., guix-commits, 2023/12/28
- 10/70: gnu: r-torch: Update to 0.12.0., guix-commits, 2023/12/28
- 09/70: gnu: liblantern: Update to 0.11.0-1.4d83bd0.,
guix-commits <=
- 11/70: gnu: r-shiny: Update to 1.8.0., guix-commits, 2023/12/28
- 23/70: gnu: r-timedate: Update to 4032.109., guix-commits, 2023/12/28
- 20/70: gnu: r-maps: Update to 3.4.2., guix-commits, 2023/12/28
- 16/70: gnu: r-aod: Update to 1.3.3., guix-commits, 2023/12/28
- 14/70: gnu: r-ggvenndiagram: Update to 1.4.9., guix-commits, 2023/12/28
- 26/70: gnu: r-ucminf: Update to 1.2.1., guix-commits, 2023/12/28
- 08/70: gnu: python-pytorch-for-r-torch: Update to 2.0.1., guix-commits, 2023/12/28
- 06/70: gnu: Add onnx-for-torch2., guix-commits, 2023/12/28
- 28/70: gnu: r-timeseries: Update to 4032.108., guix-commits, 2023/12/28
- 07/70: gnu: Add onnx-optimizer-for-torch2., guix-commits, 2023/12/28