Skip to content

Commit fc359c7

Browse files
mc-nvfpetrini15
andauthored
Windows test changes (#7503)
Co-authored-by: Francesco Petrini <francescogpetrini@gmail.com>
1 parent 2ce3377 commit fc359c7

File tree

10 files changed

+36
-24
lines changed

10 files changed

+36
-24
lines changed

Dockerfile.win10.min

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ RUN choco install unzip -y
3737
#
3838
# Installing TensorRT
3939
#
40-
ARG TENSORRT_VERSION=10.2.0.19
40+
ARG TENSORRT_VERSION=10.3.0.26
4141
ARG TENSORRT_ZIP="TensorRT-${TENSORRT_VERSION}.Windows10.x86_64.cuda-12.5.zip"
4242
ARG TENSORRT_SOURCE=https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.2.0/zip/TensorRT-10.2.0.19.Windows10.x86_64.cuda-12.5.zip
4343
# COPY ${TENSORRT_ZIP} /tmp/${TENSORRT_ZIP}
@@ -51,7 +51,7 @@ LABEL TENSORRT_VERSION="${TENSORRT_VERSION}"
5151
#
5252
# Installing cuDNN
5353
#
54-
ARG CUDNN_VERSION=9.2.1.18
54+
ARG CUDNN_VERSION=9.3.0.75
5555
ARG CUDNN_ZIP=cudnn-windows-x86_64-${CUDNN_VERSION}_cuda12-archive.zip
5656
ARG CUDNN_SOURCE=https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-9.2.1.18_cuda12-archive.zip
5757
ADD ${CUDNN_SOURCE} /tmp/${CUDNN_ZIP}
@@ -107,14 +107,14 @@ ENV VCPKG_TARGET_TRIPLET x64-windows
107107
#
108108
# Installing Visual Studio BuildTools: VS17 2022
109109
#
110-
ARG BUILDTOOLS_VERSION=17.9.34622.214
110+
ARG BUILDTOOLS_VERSION=17.10.35201.131
111111
# Download collect.exe in case of an install failure.
112112
ADD https://aka.ms/vscollect.exe "C:\tmp\collect.exe"
113113

114114
# Use the latest release channel. For more control, specify the location of an internal layout.
115115
# Download the Build Tools bootstrapper.
116116
# ARG BUILD_TOOLS_SOURCE=https://aka.ms/vs/17/release/vs_buildtools.exe
117-
ARG BUILD_TOOLS_SOURCE=https://download.visualstudio.microsoft.com/download/pr/5e7b923b-7d89-4e14-95b8-a84ab168e243/96b21d216c7954aaf606c6d7ba59a3de991884a8a86c578c767ba349c23188a9/vs_BuildTools.exe
117+
ARG BUILD_TOOLS_SOURCE=https://download.visualstudio.microsoft.com/download/pr/28626b4b-f88f-4b55-a0cf-f3eaa2c643fb/e6c43d4dfb36338d954cdb3ad9010ab2a479e712088f4f6b016eadcc721bab28/vs_BuildTools.exe
118118
ADD ${BUILD_TOOLS_SOURCE} vs_buildtools.exe
119119
# Install Build Tools with the Microsoft.VisualStudio.Workload.VCTools workload, including recommended.
120120
ARG VS_INSTALL_PATH_WP="C:\BuildTools"
@@ -181,15 +181,15 @@ RUN copy "%CUDA_INSTALL_ROOT_WP%\extras\visual_studio_integration\MSBuildExtensi
181181

182182
RUN setx PATH "%CUDA_INSTALL_ROOT_WP%\bin;%PATH%"
183183

184-
ARG CUDNN_VERSION=9.2.1.18
184+
ARG CUDNN_VERSION=9.3.0.75
185185
ENV CUDNN_VERSION ${CUDNN_VERSION}
186186
COPY --from=dependency_base /cudnn /cudnn
187187
RUN copy cudnn\bin\cudnn*.dll "%CUDA_INSTALL_ROOT_WP%\bin\."
188188
RUN copy cudnn\lib\x64\cudnn*.lib "%CUDA_INSTALL_ROOT_WP%\lib\x64\."
189189
RUN copy cudnn\include\cudnn*.h "%CUDA_INSTALL_ROOT_WP%\include\."
190190
LABEL CUDNN_VERSION="${CUDNN_VERSION}"
191191

192-
ARG TENSORRT_VERSION=10.2.0.19
192+
ARG TENSORRT_VERSION=10.3.0.26
193193
ENV TRT_VERSION ${TENSORRT_VERSION}
194194
COPY --from=dependency_base /TensorRT /TensorRT
195195
RUN setx PATH "c:\TensorRT\lib;%PATH%"

build.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ def header(self, desc=None):
203203

204204
self.comment("Exit script immediately if any command fails")
205205
if target_platform() == "windows":
206+
self._file.write("$UseStructuredOutput = $false\n")
207+
self.blankln()
206208
self._file.write("function ExitWithCode($exitcode) {\n")
207209
self._file.write(" $host.SetShouldExit($exitcode)\n")
208210
self._file.write(" exit $exitcode\n")
@@ -644,7 +646,9 @@ def onnxruntime_cmake_args(images, library_paths):
644646
"onnxruntime",
645647
"TRITON_BUILD_ONNXRUNTIME_VERSION",
646648
None,
647-
TRITON_VERSION_MAP[FLAGS.version][2],
649+
os.getenv("TRITON_BUILD_ONNXRUNTIME_VERSION")
650+
if os.getenv("TRITON_BUILD_ONNXRUNTIME_VERSION")
651+
else TRITON_VERSION_MAP[FLAGS.version][2],
648652
)
649653
]
650654

qa/L0_backend_python/test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ fi
3939
# /mnt/c when needed but the paths on the tritonserver command-line
4040
# must be C:/ style.
4141
export TEST_WINDOWS=0
42-
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
42+
if [[ -v WSL_DISTRO_NAME ]] || [[ -v MSYSTEM ]]; then
4343
export DATADIR=${DATADIR:="/c/data/inferenceserver/${REPO_VERSION}"}
4444
export TRITON_DIR=${TRITON_DIR:=c:/tritonserver}
4545
# This will run in WSL, but Triton will run in windows, so environment
4646
# variables meant for loaded models must be exported using WSLENV.
4747
# The /w flag indicates the value should only be included when invoking
4848
# Win32 from WSL.
49-
export WSLENV=TRITON_DIR/w
49+
export WSLENV=TRITON_DIR
5050
export SERVER=${SERVER:=c:/tritonserver/bin/tritonserver.exe}
5151
export BACKEND_DIR=${BACKEND_DIR:=c:/tritonserver/backends}
5252
export MODELDIR=${MODELDIR:=c:/}
53-
TEST_WINDOWS=1
53+
export TEST_WINDOWS=1
5454
else
5555
export DATADIR=${DATADIR:="/data/inferenceserver/${REPO_VERSION}"}
5656
export TRITON_DIR=${TRITON_DIR:="/opt/tritonserver"}

qa/L0_batcher/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ TF_VERSION=${TF_VERSION:=2}
7979
# On windows the paths invoked by the script (running in WSL) must use
8080
# /mnt/c when needed but the paths on the tritonserver command-line
8181
# must be C:/ style.
82-
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
82+
if [[ -v WSL_DISTRO_NAME ]] || [[ -v MSYSTEM ]]; then
8383
MODELDIR=${MODELDIR:=C:/models}
8484
DATADIR=${DATADIR:="/mnt/c/data/inferenceserver/${REPO_VERSION}"}
8585
BACKEND_DIR=${BACKEND_DIR:=C:/tritonserver/backends}
@@ -601,7 +601,7 @@ done
601601
TEST_CASE=test_multi_batch_preserve_ordering
602602

603603
# Skip test for Windows. Trace file concats at 8192 chars on Windows.
604-
if [[ "$(< /proc/sys/kernel/osrelease)" != *microsoft* ]]; then
604+
if [[ ! -v WSL_DISTRO_NAME ]] || [[ ! -v MSYSTEM ]]; then
605605
rm -fr ./custom_models && mkdir ./custom_models && \
606606
cp -r ../custom_models/custom_zero_1_float32 ./custom_models/. && \
607607
mkdir -p ./custom_models/custom_zero_1_float32/1

qa/L0_grpc/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ NGINX_CONF="./nginx.conf"
4848
# On windows the paths invoked by the script (running in WSL) must use
4949
# /mnt/c when needed but the paths on the tritonserver command-line
5050
# must be C:/ style.
51-
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
51+
if [[ -v WSL_DISTRO_NAME ]] || [[ -v MSYSTEM ]]; then
5252
SDKDIR=${SDKDIR:=C:/sdk}
5353
MODELDIR=${MODELDIR:=C:/models}
5454
CLIENT_PLUGIN_MODELDIR=${MODELDIR:=C:/client_plugin_models}

qa/L0_http/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ NGINX_CONF="./nginx.conf"
4949
# On windows the paths invoked by the script (running in WSL) must use
5050
# /mnt/c when needed but the paths on the tritonserver command-line
5151
# must be C:/ style.
52-
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
52+
if [[ -v WSL_DISTRO_NAME ]] || [[ -v MSYSTEM ]]; then
5353
SDKDIR=${SDKDIR:=C:/sdk}
5454
MODELDIR=${MODELDIR:=C:/models}
5555
DATADIR=${DATADIR:="/mnt/c/data/inferenceserver/${REPO_VERSION}"}

qa/L0_infer/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ DEFAULT_SHM_SIZE_BYTES=$((1024*1024*$DEFAULT_SHM_SIZE_MB))
8787
# On windows the paths invoked by the script (running in WSL) must use
8888
# /mnt/c when needed but the paths on the tritonserver command-line
8989
# must be C:/ style.
90-
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
90+
if [[ -v WSL_DISTRO_NAME ]] || [[ -v MSYSTEM ]]; then
9191
MODELDIR=${MODELDIR:=C:/models}
9292
DATADIR=${DATADIR:="/mnt/c/data/inferenceserver/${REPO_VERSION}"}
9393
BACKEND_DIR=${BACKEND_DIR:=C:/tritonserver/backends}

qa/L0_sequence_batcher/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ TF_VERSION=${TF_VERSION:=2}
9393
# /mnt/c when needed but the paths on the tritonserver command-line
9494
# must be C:/ style.
9595
WINDOWS=0
96-
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
96+
if [[ -v WSL_DISTRO_NAME ]] || [[ -v MSYSTEM ]]; then
9797
MODELDIR=${MODELDIR:=C:/models}
9898
DATADIR=${DATADIR:="/mnt/c/data/inferenceserver/${REPO_VERSION}"}
9999
BACKEND_DIR=${BACKEND_DIR:=C:/tritonserver/backends}

qa/L0_trt_plugin/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ PLUGIN_TEST=trt_plugin_test.py
4747
# On windows the paths invoked by the script (running in WSL) must use
4848
# /mnt/c when needed but the paths on the tritonserver command-line
4949
# must be C:/ style.
50-
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
50+
if [[ -v WSL_DISTRO_NAME ]] || [[ -v MSYSTEM ]]; then
5151
DATADIR=${DATADIR:="/mnt/c/data/inferenceserver/${REPO_VERSION}"}
5252
MODELDIR=${MODELDIR:=C:/models}
5353
CUSTOMPLUGIN=${CUSTOMPLUGIN:=$MODELDIR/HardmaxPlugin.dll}
@@ -135,7 +135,7 @@ SERVER_LD_PRELOAD=$CUSTOMPLUGIN
135135
SERVER_ARGS=$SERVER_ARGS_BASE
136136
SERVER_LOG="./inference_server_$LOG_IDX.log"
137137

138-
if [[ "$(< /proc/sys/kernel/osrelease)" != *microsoft* ]]; then
138+
if [[ ! -v WSL_DISTRO_NAME ]] || [[ ! -v MSYSTEM ]]; then
139139
run_server
140140
if [ "$SERVER_PID" == "0" ]; then
141141
echo -e "\n***\n*** Failed to start $SERVER\n***"

qa/common/util.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function run_server_nowait () {
257257
return
258258
fi
259259

260-
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
260+
if [[ -v WSL_DISTRO_NAME ]] || [[ -v MSYSTEM ]]; then
261261
# LD_PRELOAD not yet supported on windows
262262
if [ -z "$SERVER_LD_PRELOAD" ]; then
263263
echo "=== Running $SERVER $SERVER_ARGS"
@@ -329,7 +329,7 @@ function kill_server () {
329329
# causes the entire WSL shell to just exit. So instead we must use
330330
# taskkill.exe which can only forcefully kill tritonserver which
331331
# means that it does not gracefully exit.
332-
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
332+
if [[ -v WSL_DISTRO_NAME ]]; then
333333
# Disable -x as it makes output below hard to read
334334
oldstate="$(set +o)"; [[ -o errexit ]] && oldstate="$oldstate; set -e"
335335
set +x
@@ -353,6 +353,8 @@ function kill_server () {
353353
fi
354354

355355
set +vx; eval "$oldstate"
356+
elif [[ -v MSYSTEM ]] ; then
357+
taskkill //F //IM tritonserver.exe
356358
else
357359
# Non-windows...
358360
kill $SERVER_PID
@@ -512,17 +514,23 @@ remove_array_outliers() {
512514

513515
function setup_virtualenv() {
514516
# Create and activate virtual environment
515-
virtualenv --system-site-packages venv
516-
source venv/bin/activate
517-
pip install pytest
517+
if [[ -v MSYSTEM ]]; then
518+
pip3 install pytest
519+
else
520+
virtualenv --system-site-packages venv
521+
source venv/bin/activate
522+
pip install pytest
523+
fi
518524

519525
if [[ ${TEST_WINDOWS} == 1 ]]; then
520-
pip3 install "numpy<2" tritonclient[all]
526+
pip3 install "numpy<2" tritonclient[all]
521527
fi
522528
}
523529

524530
function deactivate_virtualenv() {
525531
# Deactivate virtual environment and clean up
532+
if [[ ! -v MSYSTEM ]]; then
526533
deactivate
527534
rm -fr venv
535+
fi
528536
}

0 commit comments

Comments
 (0)