forked from mortont/axon_onnx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
95 lines (84 loc) · 1.94 KB
/
mix.exs
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
84
85
86
87
88
89
90
91
92
93
94
95
defmodule AxonOnnx.MixProject do
use Mix.Project
@source_url "https://github.com/elixir-nx/axon_onnx"
@version "0.4.0"
def project do
[
app: :axon_onnx,
version: @version,
name: "AxonOnnx",
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
docs: docs(),
description: "Convert models between Axon/ONNX",
package: package(),
preferred_cli_env: [
docs: :docs,
"hex.publish": :docs
],
aliases: aliases()
]
end
defp elixirc_paths(:test), do: ~w(lib test/support)
defp elixirc_paths(_), do: ~w(lib)
# 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
[
{:axon, "~> 0.5", axon_opts()},
{:protox, "~> 1.6.10"},
{:nx, "~> 0.5", nx_opts()},
{:exla, "~> 0.5", [only: :test] ++ exla_opts()},
{:req, "~> 0.1.0", only: :test},
{:jason, "~> 1.2", only: :test},
{:ex_doc, "~> 0.23", only: :docs}
]
end
defp package do
[
maintainers: ["Sean Moriarity"],
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url}
]
end
defp docs do
[
main: "AxonOnnx",
source_ref: "v#{@version}",
source_url: @source_url
]
end
defp axon_opts do
if path = System.get_env("AXON_PATH") do
[path: path]
else
[]
end
end
defp nx_opts do
if path = System.get_env("AXON_NX_PATH") do
[path: path, override: true]
else
[]
end
end
defp exla_opts do
if path = System.get_env("AXON_EXLA_PATH") do
[path: path]
else
[]
end
end
defp aliases() do
[
generate_protobuf:
"protox.generate --generate-defs-funs=false --keep-unknown-fields=false --multiple-files --output-path=./lib/onnx ./scripts/onnx.proto"
]
end
end