-
Notifications
You must be signed in to change notification settings - Fork 31
/
build.sbt
69 lines (52 loc) · 2.61 KB
/
build.sbt
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
name := (sys.props.getOrElse("gpu", "false") match {
case "true" | "1" => "ai-serving-cuda"
case _ => "ai-serving"
})
version := "1.5.2"
organization := "com.autodeployai"
organizationHomepage := Some(new URL("https://autodeployai.com"))
description := "Serving AI/ML models in the open standard formats PMML and ONNX with both HTTP (REST API) and gRPC endpoints"
homepage := Some(new URL("https://github.com/autodeployai/ai-serving"))
startYear := Some(2019)
licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt"))
scalaVersion := "2.13.14"
scalacOptions := Seq("-feature", "-language:_", "-unchecked", "-deprecation", "-encoding", "utf8")
scalacOptions in(Compile, doc) := Seq("-no-link-warnings")
val akkaVersion = "2.7.0"
val akkaHttpVersion = "10.5.3"
val pmml4sVersion = "1.5.2"
val onnxruntimeVersion = "1.18.0"
libraryDependencies ++= {
(sys.props.getOrElse("gpu", "false") match {
case "true" | "1" => Some("com.microsoft.onnxruntime" % "onnxruntime_gpu" % onnxruntimeVersion)
case _ => Some("com.microsoft.onnxruntime" % "onnxruntime" % onnxruntimeVersion)
}).toSeq ++ Seq(
"org.pmml4s" %% "pmml4s" % pmml4sVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"ch.qos.logback" % "logback-classic" % "1.2.3",
"io.grpc" % "grpc-netty" % scalapb.compiler.Version.grpcJavaVersion,
"com.thesamet.scalapb" %% "scalapb-runtime-grpc" % scalapb.compiler.Version.scalapbVersion,
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf",
"org.scalatest" %% "scalatest" % "3.0.8" % "test",
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % "test",
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "test",
"io.grpc" % "grpc-testing" % "1.28.0" % "test"
)
}
PB.targets in Compile := Seq(
scalapb.gen(flatPackage = true) -> (sourceManaged in Compile).value
)
parallelExecution in Test := false
assemblyMergeStrategy in assembly := {
case "META-INF/io.netty.versions.properties" => MergeStrategy.last
case "META-INF/versions/9/module-info.class" => MergeStrategy.concat
case PathList("google", "protobuf", xs @ _*) => MergeStrategy.last
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
Test / fork := true
javaOptions in Test ++= Seq("--add-exports", "java.base/jdk.internal.math=ALL-UNNAMED")