forked from elixir-nx/ortex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
83 lines (77 loc) · 2.42 KB
/
mix.exs
File metadata and controls
83 lines (77 loc) · 2.42 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
defmodule Ortex.MixProject do
use Mix.Project
# NOTE: while testing precompiled NIFs from this fork, both @version
# and @source_url must match exactly what's published. RustlerPrecompiled
# constructs the artifact download URL as
# `<@source_url>/releases/download/v<@version>/<artifact-name>`
# at consumer compile time. The git tag must be `v<@version>` literally.
# When upstreaming to elixir-nx/ortex, revert @source_url to the upstream
# URL and bump @version to whatever the next upstream release should be.
@version "0.1.11-pre4"
@source_url "https://github.com/elixir-image/ortex"
def project do
[
app: :ortex,
version: @version,
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
deps: deps(),
# Docs
name: "Ortex",
source_url: @source_url,
homepage_url: @source_url,
docs: [
main: "readme",
extras: ["README.md", "CHANGELOG.md"]
],
package: package()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# Rustler is required only for source-compiled builds (when
# `ORTEX_BUILD=true` is set or no precompiled artifact exists for
# the target). Made optional so consumers using precompiled NIFs
# don't need a Rust toolchain on PATH. Kept at the original
# `~> 0.27` constraint that the source-build path was tested
# against — bumping the floor showed no benefit and risked
# changing build-output paths in ways `Ortex.Util.copy_ort_libs/0`
# couldn't follow.
{:rustler, "~> 0.27", optional: true},
{:rustler_precompiled, "~> 0.8"},
{:nx, "~> 0.6"},
{:tokenizers, "~> 0.4", only: :dev},
{:ex_doc, "0.29.4", only: :dev, runtime: false},
{:exla, "~> 0.6", only: :dev},
{:torchx, "~> 0.6", only: :dev}
]
end
defp package do
[
files: ~w(
lib
.formatter.exs
mix.exs
README*
CHANGELOG*
LICENSE*
checksum-*.exs
native/ortex/src/
config/config.exs
native/ortex/Cargo.lock
native/ortex/Cargo.toml
native/ortex/.cargo/config.toml
),
licenses: ["MIT"],
links: %{"GitHub" => @source_url},
description: "ONNX Runtime bindings for Elixir"
]
end
end