-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added piplock refresh
- Loading branch information
Showing
3 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
|
||
cd $(mktemp -d) | ||
|
||
git clone https://huggingface.co/google/flan-t5-small | ||
|
||
/tmp/utils/convert.py --model-path flan-t5-small --model-save-path flan-t5-small-caikit | ||
|
||
mv flan-t5-small-caikit /opt/models/ | ||
|
||
CAIKIT_LOG_FILE=$(mktemp) | ||
cd /caikit | ||
./start-serving.sh &>$CAIKIT_LOG_FILE & | ||
# timeout --signal=SIGINT 30 bash -c "tail -f -n0 $CAIKIT_LOG_FILE | grep 'Caikit Runtime is serving on port'" | ||
timeout --signal=SIGINT 30 bash -c "grep -m1 'Caikit Runtime is serving on port' <(tail -f $CAIKIT_LOG_FILE)" | ||
|
||
cat $CAIKIT_LOG_FILE | ||
|
||
grpcurl -plaintext -d '{"text": "At what temperature does liquid Nitrogen boil?"}' -H "mm-model-id: flan-t5-small-caikit" localhost:8085 caikit.runtime.Nlp.NlpService/TextGenerationTaskPredict | ||
rc=$? | ||
|
||
kill %1 | ||
|
||
exit $rc |