Skip to content

Commit

Permalink
Fix benchmark deb build (#2050)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachgk authored Jun 12, 2024
1 parent 3c18dbc commit f04d5f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,24 @@ tasks {
dependsOn("prepareDeb")

packageName = "djl-bench"
archiveVersion = version
archiveVersion = "$project.version"
release = "1"
maintainer = "Deep Java Library <djl-dev@amazon.com>"
summary = "djl-bench is a command line tool that allows you to benchmark the\n" +
" model on all different platforms for single-thread/multi-thread\n" +
" inference performance."

from(buildDirectory / "benchmark-${version}") {
into("/usr/local/djl-bench-${version}")
from(buildDirectory / "benchmark-${project.version}") {
into("/usr/local/djl-bench-${project.version}")
}
link("/usr/bin/djl-bench", "/usr/local/djl-bench-${version}/bin/benchmark")
link("/usr/bin/djl-bench", "/usr/local/djl-bench-${project.version}/bin/benchmark")
}

register<Exec>("installOnLinux") {
dependsOn("createDeb")
doFirst {
if ("linux" in os) {
val ver = version.toString().replace("-", "~")
val ver = project.version.toString().replace("-", "~")
commandLine("sudo", "dpkg", "-i", "${buildDirectory}/distributions/djl-bench_${ver}-1_all.deb")
} else {
throw GradleException("task installOnLinux Only supported on Linux.")
Expand Down

0 comments on commit f04d5f3

Please sign in to comment.