@@ -44,6 +44,7 @@ install_conda
4444# Tensorflow 2.1.0 only works with Python 3.4 - 3.7. Successful execution of
4545# the Python model indicates that the environment has been setup correctly.
4646# Create a model with python 3.7 version
47+ export PY_VERSION=" 3.7"
4748create_conda_env " 3.7" " python-3-7"
4849conda install numpy=1.20.1 -y
4950conda install tensorflow=2.1.0 -y
@@ -67,6 +68,7 @@ conda deactivate
6768# previous test.
6869# Tensorflow 2.1.0 only works with Python 3.4 - 3.7. Successful execution of
6970# the Python model indicates that the environment has been setup correctly.
71+ export PY_VERSION=" 3.7.1"
7072path_to_conda_pack=" $PWD /python-3-7-1"
7173create_conda_env_with_specified_path " 3.7" $path_to_conda_pack
7274conda install numpy=1.20.3 -y
@@ -89,6 +91,7 @@ conda deactivate
8991# Create a model with python 3.6 version
9092# Tensorflow 2.1.0 only works with Python 3.4 - 3.7. Successful execution of
9193# the Python model indicates that the environment has been setup correctly.
94+ export PY_VERSION=" 3.6"
9295create_conda_env " 3.6" " python-3-6"
9396conda install -c conda-forge libstdcxx-ng=14 -y
9497conda install numpy=1.18.1 -y
@@ -116,9 +119,13 @@ conda deactivate
116119path_to_conda_pack=' $$TRITON_MODEL_DIRECTORY/python_3_12_environment.tar.gz'
117120create_conda_env " 3.12" " python-3-12"
118121conda install -c conda-forge libstdcxx-ng=14 -y
122+ TF_VERSION=" 2.16.2"
119123conda install numpy=1.26.4 -y
120- conda install tensorflow=2.16.2 -y
121- PY312_VERSION_STRING=" Python version is 3.12, NumPy version is 1.26.4, and Tensorflow version is 2.16.2"
124+ if [ $TRITON_RHEL -eq 1 ]; then
125+ TF_VERSION=" 2.17.0"
126+ fi
127+ conda install tensorflow=${TF_VERSION} -y
128+ PY312_VERSION_STRING=" Python version is 3.12, NumPy version is 1.26.4, and Tensorflow version is ${TF_VERSION} "
122129conda pack -o python3.12.tar.gz
123130mkdir -p models/python_3_12/1/
124131cp ../../python_models/python_version/config.pbtxt ./models/python_3_12
@@ -137,8 +144,7 @@ if [ "$SERVER_PID" == "0" ]; then
137144 exit 1
138145fi
139146
140- kill $SERVER_PID
141- wait $SERVER_PID
147+ kill_server
142148
143149set +e
144150for EXPECTED_VERSION_STRING in " $PY36_VERSION_STRING " " $PY37_VERSION_STRING " " $PY37_1_VERSION_STRING " " $PY312_VERSION_STRING " ; do
@@ -154,6 +160,15 @@ done
154160# NOTE: In certain pybind versions, the locale settings may not be propagated from parent to
155161# stub processes correctly. See https://github.com/triton-inference-server/python_backend/pull/260.
156162export LC_ALL=INVALID
163+ run_server
164+ if [ " $SERVER_PID " == " 0" ]; then
165+ echo -e " \n***\n*** Failed to start $SERVER \n***"
166+ cat $SERVER_LOG
167+ exit 1
168+ fi
169+
170+ kill_server
171+
157172grep " Locale is (None, None)" $SERVER_LOG
158173 if [ $? -ne 0 ]; then
159174 cat $SERVER_LOG
@@ -175,8 +190,7 @@ if [ "$SERVER_PID" == "0" ]; then
175190 exit 1
176191fi
177192
178- kill $SERVER_PID
179- wait $SERVER_PID
193+ kill_server
180194
181195set +e
182196grep " Locale is ('en_US', 'UTF-8')" $SERVER_LOG
@@ -207,8 +221,7 @@ touch -m models/python_3_12/python_3_12_environment.tar.gz
207221# The environment should be re-extracted
208222curl -v -X POST localhost:8000/v2/repository/models/python_3_12/load
209223
210- kill $SERVER_PID
211- wait $SERVER_PID
224+ kill_server
212225
213226set +e
214227
@@ -248,6 +261,8 @@ rm -rf models/python_3_7
248261aws s3 cp models/ " ${BUCKET_URL_SLASH} " --recursive --include " *"
249262
250263rm $SERVER_LOG
264+ # Occasionally needs more time to load
265+ SERVER_TIMEOUT=420
251266
252267SERVER_ARGS=" --model-repository=$BUCKET_URL_SLASH --log-verbose=1"
253268run_server
@@ -258,8 +273,7 @@ if [ "$SERVER_PID" == "0" ]; then
258273 exit 1
259274fi
260275
261- kill $SERVER_PID
262- wait $SERVER_PID
276+ kill_server
263277
264278set +e
265279grep " $PY36_VERSION_STRING " $SERVER_LOG
@@ -292,8 +306,7 @@ if [ "$SERVER_PID" == "0" ]; then
292306 exit 1
293307fi
294308
295- kill $SERVER_PID
296- wait $SERVER_PID
309+ kill_server
297310
298311set +e
299312for EXPECTED_VERSION_STRING in " $PY36_VERSION_STRING " " $PY312_VERSION_STRING " ; do
0 commit comments