@@ -43,8 +43,11 @@ if [ "$TEST_JETSON" == "0" ]; then
43
43
pip3 uninstall -y torch
44
44
pip3 install torch==1.9.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html
45
45
fi
46
+
46
47
# Install JAX
47
- pip3 install --upgrade " jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
48
+ if [ " $TEST_JETSON " == " 0" ]; then
49
+ pip3 install --upgrade " jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
50
+ fi
48
51
49
52
git clone https://github.com/triton-inference-server/python_backend -b $PYTHON_BACKEND_REPO_TAG
50
53
cd python_backend
@@ -112,35 +115,37 @@ wait $SERVER_PID
112
115
# Example 3
113
116
114
117
# JAX AddSub
115
- CLIENT_LOG=" ./jax_client.log"
116
- mkdir -p models/jax/1/
117
- cp examples/jax/model.py models/jax/1/model.py
118
- cp examples/jax/config.pbtxt models/jax/config.pbtxt
119
- run_server
120
- if [ " $SERVER_PID " == " 0" ]; then
121
- echo -e " \n***\n*** Failed to start $SERVER \n***"
122
- cat $SERVER_LOG
123
- RET=1
124
- fi
125
-
126
- set +e
127
- python3 examples/jax/client.py > $CLIENT_LOG
128
- if [ $? -ne 0 ]; then
129
- echo -e " \n***\n*** Failed to verify jax example. \n***"
130
- RET=1
131
- fi
118
+ # JAX is not supported on Jetson
119
+ if [ " $TEST_JETSON " == " 0" ]; then
120
+ CLIENT_LOG=" ./jax_client.log"
121
+ mkdir -p models/jax/1/
122
+ cp examples/jax/model.py models/jax/1/model.py
123
+ cp examples/jax/config.pbtxt models/jax/config.pbtxt
124
+ run_server
125
+ if [ " $SERVER_PID " == " 0" ]; then
126
+ echo -e " \n***\n*** Failed to start $SERVER \n***"
127
+ cat $SERVER_LOG
128
+ RET=1
129
+ fi
132
130
133
- grep " PASS" $CLIENT_LOG
134
- if [ $? -ne 0 ]; then
135
- echo -e " \n***\n*** Failed to verify jax example. \n***"
136
- cat $CLIENT_LOG
137
- RET=1
138
- fi
139
- set -e
131
+ set +e
132
+ python3 examples/jax/client.py > $CLIENT_LOG
133
+ if [ $? -ne 0 ]; then
134
+ echo -e " \n***\n*** Failed to verify jax example. \n***"
135
+ RET=1
136
+ fi
140
137
141
- kill $SERVER_PID
142
- wait $SERVER_PID
138
+ grep " PASS" $CLIENT_LOG
139
+ if [ $? -ne 0 ]; then
140
+ echo -e " \n***\n*** Failed to verify jax example. \n***"
141
+ cat $CLIENT_LOG
142
+ RET=1
143
+ fi
144
+ set -e
143
145
146
+ kill $SERVER_PID
147
+ wait $SERVER_PID
148
+ fi
144
149
145
150
# Example 4
146
151
0 commit comments