@@ -47,7 +47,7 @@ install_conda
4747create_conda_env " 3.7" " python-3-7"
4848conda install numpy=1.20.1 -y
4949conda install tensorflow=2.1.0 -y
50- conda install -c conda-forge libstdcxx-ng=12 -y
50+ conda install -c conda-forge libstdcxx-ng=14 -y
5151
5252PY37_VERSION_STRING=" Python version is 3.7, NumPy version is 1.20.1, and Tensorflow version is 2.1.0"
5353create_python_backend_stub
@@ -71,7 +71,7 @@ path_to_conda_pack="$PWD/python-3-7-1"
7171create_conda_env_with_specified_path " 3.7" $path_to_conda_pack
7272conda install numpy=1.20.3 -y
7373conda install tensorflow=2.1.0 -y
74- conda install -c conda-forge libstdcxx-ng=12 -y
74+ conda install -c conda-forge libstdcxx-ng=14 -y
7575
7676PY37_1_VERSION_STRING=" Python version is 3.7, NumPy version is 1.20.3, and Tensorflow version is 2.1.0"
7777create_python_backend_stub
@@ -90,7 +90,7 @@ conda deactivate
9090# Tensorflow 2.1.0 only works with Python 3.4 - 3.7. Successful execution of
9191# the Python model indicates that the environment has been setup correctly.
9292create_conda_env " 3.6" " python-3-6"
93- conda install -c conda-forge libstdcxx-ng=12 -y
93+ conda install -c conda-forge libstdcxx-ng=14 -y
9494conda install numpy=1.18.1 -y
9595conda install tensorflow=2.1.0 -y
9696PY36_VERSION_STRING=" Python version is 3.6, NumPy version is 1.18.1, and Tensorflow version is 2.1.0"
@@ -110,22 +110,23 @@ cp python_backend/builddir/triton_python_backend_stub ./models/python_3_6
110110conda deactivate
111111
112112# Test conda env without custom Python backend stub This environment should
113- # always use the default Python version shipped in the container. For Ubuntu 22.04
114- # it is Python 3.10 and for Ubuntu 20.04 is 3.8
115- path_to_conda_pack=' $$TRITON_MODEL_DIRECTORY/python_3_10_environment.tar.gz'
116- create_conda_env " 3.10" " python-3-10"
117- conda install -c conda-forge libstdcxx-ng=12 -y
118- conda install numpy=1.23.4 -y
119- conda install tensorflow=2.10.0 -y
120- PY310_VERSION_STRING=" Python version is 3.10, NumPy version is 1.23.4, and Tensorflow version is 2.10.0"
121- conda pack -o python3.10.tar.gz
122- mkdir -p models/python_3_10/1/
123- cp ../../python_models/python_version/config.pbtxt ./models/python_3_10
124- cp python3.10.tar.gz models/python_3_10/python_3_10_environment.tar.gz
125- (cd models/python_3_10 && \
126- sed -i " s/^name:.*/name: \" python_3_10\" /" config.pbtxt && \
113+ # always use the default Python version shipped in the container. For Ubuntu
114+ # 24.04 it is Python 3.12, for Ubuntu 22.04 is Python 3.10 and for Ubuntu 20.04
115+ # is 3.8.
116+ path_to_conda_pack=' $$TRITON_MODEL_DIRECTORY/python_3_12_environment.tar.gz'
117+ create_conda_env " 3.12" " python-3-12"
118+ conda install -c conda-forge libstdcxx-ng=14 -y
119+ conda 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"
122+ conda pack -o python3.12.tar.gz
123+ mkdir -p models/python_3_12/1/
124+ cp ../../python_models/python_version/config.pbtxt ./models/python_3_12
125+ cp python3.12.tar.gz models/python_3_12/python_3_12_environment.tar.gz
126+ (cd models/python_3_12 && \
127+ sed -i " s/^name:.*/name: \" python_3_12\" /" config.pbtxt && \
127128 echo " parameters: {key: \" EXECUTION_ENV_PATH\" , value: {string_value: \" $path_to_conda_pack \" }}" >> config.pbtxt)
128- cp ../../python_models/python_version/model.py ./models/python_3_10 /1/
129+ cp ../../python_models/python_version/model.py ./models/python_3_12 /1/
129130conda deactivate
130131rm -rf ./miniconda
131132
@@ -140,7 +141,7 @@ kill $SERVER_PID
140141wait $SERVER_PID
141142
142143set +e
143- for EXPECTED_VERSION_STRING in " $PY36_VERSION_STRING " " $PY37_VERSION_STRING " " $PY37_1_VERSION_STRING " " $PY310_VERSION_STRING " ; do
144+ for EXPECTED_VERSION_STRING in " $PY36_VERSION_STRING " " $PY37_VERSION_STRING " " $PY37_1_VERSION_STRING " " $PY312_VERSION_STRING " ; do
144145 grep " $EXPECTED_VERSION_STRING " $SERVER_LOG
145146 if [ $? -ne 0 ]; then
146147 cat $SERVER_LOG
@@ -198,21 +199,21 @@ if [ "$SERVER_PID" == "0" ]; then
198199fi
199200
200201# The environment should be extracted
201- curl -v -X POST localhost:8000/v2/repository/models/python_3_10 /load
202- touch -m models/python_3_10 /1/model.py
202+ curl -v -X POST localhost:8000/v2/repository/models/python_3_12 /load
203+ touch -m models/python_3_12 /1/model.py
203204# The environment should not be re-extracted
204- curl -v -X POST localhost:8000/v2/repository/models/python_3_10 /load
205- touch -m models/python_3_10/python_3_10_environment .tar.gz
205+ curl -v -X POST localhost:8000/v2/repository/models/python_3_12 /load
206+ touch -m models/python_3_12/python_3_12_environment .tar.gz
206207# The environment should be re-extracted
207- curl -v -X POST localhost:8000/v2/repository/models/python_3_10 /load
208+ curl -v -X POST localhost:8000/v2/repository/models/python_3_12 /load
208209
209210kill $SERVER_PID
210211wait $SERVER_PID
211212
212213set +e
213214
214- PY310_ENV_EXTRACTION =" Extracting Python execution env"
215- if [ ` grep -c " ${PY310_ENV_EXTRACTION } " ${SERVER_LOG} ` != " 2" ]; then
215+ PY312_ENV_EXTRACTION =" Extracting Python execution env"
216+ if [ ` grep -c " ${PY312_ENV_EXTRACTION } " ${SERVER_LOG} ` != " 2" ]; then
216217 cat $SERVER_LOG
217218 echo -e " \n***\n*** Python execution environment should be extracted exactly twice. \n***"
218219 RET=1
@@ -275,8 +276,8 @@ aws s3 rm "${BUCKET_URL_SLASH}" --recursive --include "*"
275276# Test with EXECUTION_ENV_PATH outside the model directory
276277sed -i " s/TRITON_MODEL_DIRECTORY\/python_3_6_environment/TRITON_MODEL_DIRECTORY\/..\/python_3_6_environment/" models/python_3_6/config.pbtxt
277278mv models/python_3_6/python_3_6_environment.tar.gz models
278- sed -i " s/\$\$ TRITON_MODEL_DIRECTORY\/python_3_10_environment /s3:\/\/triton-bucket-${CI_JOB_ID} \/python_3_10_environment /" models/python_3_10 /config.pbtxt
279- mv models/python_3_10/python_3_10_environment .tar.gz models
279+ sed -i " s/\$\$ TRITON_MODEL_DIRECTORY\/python_3_12_environment /s3:\/\/triton-bucket-${CI_JOB_ID} \/python_3_12_environment /" models/python_3_12 /config.pbtxt
280+ mv models/python_3_12/python_3_12_environment .tar.gz models
280281
281282aws s3 cp models/ " ${BUCKET_URL_SLASH} " --recursive --include " *"
282283
@@ -295,7 +296,7 @@ kill $SERVER_PID
295296wait $SERVER_PID
296297
297298set +e
298- for EXPECTED_VERSION_STRING in " $PY36_VERSION_STRING " " $PY310_VERSION_STRING " ; do
299+ for EXPECTED_VERSION_STRING in " $PY36_VERSION_STRING " " $PY312_VERSION_STRING " ; do
299300 grep " $EXPECTED_VERSION_STRING " $SERVER_LOG
300301 if [ $? -ne 0 ]; then
301302 cat $SERVER_LOG
0 commit comments