-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
opam
50 lines (50 loc) · 1.75 KB
/
opam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
opam-version: "2.0"
homepage: "https://github.com/LaurentMazare/ocaml-torch"
maintainer: "lmazare@gmail.com"
bug-reports: "https://github.com/LaurentMazare/ocaml-torch/issues"
dev-repo: "git+https://github.com/LaurentMazare/ocaml-torch.git"
authors: [
"Laurent Mazare"
]
install: [
[
"sh"
"-c"
"test -d %{lib}%/libtorch/lib/libtorch.so || ( unzip libtorch-linux.zip && mv -f libtorch %{lib}%/ )"
] { os = "linux" }
[
"sh"
"-c"
"test -d %{lib}%/libtorch/lib/libtorch.so || ( unzip libtorch-macos.zip && mv -f libtorch %{lib}%/ && tar xzf mklml-macos.tgz && mv -f mklml_mac_2019.0.1.20181227/lib/libmklml.dylib %{lib}%/libtorch/lib/ && mv -f mklml_mac_2019.0.1.20181227/lib/libiomp5.dylib %{lib}%/libtorch/lib/ )"
] { os = "macos" }
]
depexts: [
["libomp"] {os-distribution = "homebrew" & os = "macos"}
]
synopsis: "LibTorch library package"
description: """
This is used by the torch package to trigger the install of the
libtorch library."""
extra-source "libtorch-linux.zip" {
src:
"https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.3.0%2Bcpu.zip"
checksum: [
"sha256=c2e4fa57e4e4f61d162716a28f656c8490894e032a7c220e6084115ceadbfc30"
"md5=dfb63dc5d142628e21a2ac5aee013255"
]
}
extra-source "libtorch-macos.zip" {
src: "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.3.0.zip"
checksum: [
"sha256=c44050d28bf21676f68fa0f87caa27bc610cd9802c41b5c83e87295d22e048a4"
"md5=180651185e3e10c1d386dfeeb099e25f"
]
}
extra-source "mklml-macos.tgz" {
src:
"https://github.com/intel/mkl-dnn/releases/download/v0.17.2/mklml_mac_2019.0.1.20181227.tgz"
checksum: [
"sha256=1ddbb0922254f9b4e545f89a9cf952378f4a5d421f671e53b79e4f3a5da0dba9"
"md5=a8b4b158dc8e7aad13c0d594a9a8d241"
]
}