Skip to content

Commit

Permalink
Add Javacpp-presets repo location as env variable in Java tests(#6385) (
Browse files Browse the repository at this point in the history
#6441)

Simplify testing when upstream (javacpp-presets) build changes. Related to triton-inference-server/client#409
  • Loading branch information
jbkyang-nvi authored Oct 17, 2023
1 parent 2172606 commit e27caf0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion qa/L0_java_memory_growth/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@

# Set up test files based on installation instructions
# https://github.com/bytedeco/javacpp-presets/blob/master/tritonserver/README.md
JAVACPP_BRANCH=${JAVACPP_BRANCH:="https://github.com/bytedeco/javacpp-presets.git"}
JAVACPP_BRANCH_TAG=${JAVACPP_BRANCH_TAG:="master"}
set -e
git clone --single-branch --depth=1 -b ${TRITON_CLIENT_REPO_TAG} https://github.com/triton-inference-server/client.git
source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --keep-build-dependencies
source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --javacpp-branch ${JAVACPP_BRANCH} --javacpp-tag ${JAVACPP_BRANCH_TAG} --keep-build-dependencies
cd ..

export MAVEN_OPTS="-XX:MaxGCPauseMillis=40"
Expand Down
4 changes: 3 additions & 1 deletion qa/L0_java_resnet/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ fi
# Models
DATADIR=/data/inferenceserver/${REPO_VERSION}
MODEL_REPO=`pwd`/models
JAVACPP_BRANCH=${JAVACPP_BRANCH:="https://github.com/bytedeco/javacpp-presets.git"}
JAVACPP_BRANCH_TAG=${JAVACPP_BRANCH_TAG:="master"}

# Create local model repository
mkdir -p ${MODEL_REPO}
Expand All @@ -55,7 +57,7 @@ done
# https://github.com/bytedeco/javacpp-presets/blob/master/tritonserver/README.md
set -e
git clone --single-branch --depth=1 -b ${TRITON_CLIENT_REPO_TAG} https://github.com/triton-inference-server/client.git
source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --keep-build-dependencies
source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --javacpp-branch ${JAVACPP_BRANCH} --javacpp-tag ${JAVACPP_BRANCH_TAG} --keep-build-dependencies
cd ..

CLIENT_LOG="client.log"
Expand Down
4 changes: 3 additions & 1 deletion qa/L0_java_sequence_batcher/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ fi

# Models
DATADIR=/data/inferenceserver/${REPO_VERSION}
JAVACPP_BRANCH=${JAVACPP_BRANCH:="https://github.com/bytedeco/javacpp-presets.git"}
JAVACPP_BRANCH_TAG=${JAVACPP_BRANCH_TAG:="master"}

# Set up test files based on installation instructions
# https://github.com/bytedeco/javacpp-presets/blob/master/tritonserver/README.md
set -e
git clone --single-branch --depth=1 -b ${TRITON_CLIENT_REPO_TAG} https://github.com/triton-inference-server/client.git
source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --keep-build-dependencies
source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --javacpp-branch ${JAVACPP_BRANCH} --javacpp-tag ${JAVACPP_BRANCH_TAG} --keep-build-dependencies
cd ..

CLIENT_LOG="client.log"
Expand Down
4 changes: 3 additions & 1 deletion qa/L0_java_simple_example/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ if [ -z "$REPO_VERSION" ]; then
exit 1
fi

JAVACPP_BRANCH=${JAVACPP_BRANCH:="https://github.com/bytedeco/javacpp-presets.git"}
JAVACPP_BRANCH_TAG=${JAVACPP_BRANCH_TAG:="master"}
set -e
git clone --single-branch --depth=1 -b ${TRITON_CLIENT_REPO_TAG} https://github.com/triton-inference-server/client.git
source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --keep-build-dependencies
source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --javacpp-branch ${JAVACPP_BRANCH} --javacpp-tag ${JAVACPP_BRANCH_TAG} --keep-build-dependencies
cd ..

CLIENT_LOG="client_cpu_only.log"
Expand Down

0 comments on commit e27caf0

Please sign in to comment.