docker: download bootleg material on start as well

This commit is contained in:
Giovanni Campagna 2021-02-19 16:02:51 -08:00
parent 69c5029f5f
commit 398bc7162f
1 changed files with 5 additions and 4 deletions

View File

@ -2,9 +2,10 @@
set -ex
if [ -n "${S3_MODEL_DIR}" ]; then
aws s3 sync --exclude '*/dataset/*' --exclude '*/cache/*' --exclude 'iteration_*.pth' --exclude '*_optim.pth' "${S3_MODEL_DIR}" ./model
genienlp kfserver --path ./model $@
else
genienlp $@
aws s3 sync --no-progress --exclude '*/dataset/*' --exclude '*/cache/*' --exclude 'iteration_*.pth' --exclude '*_optim.pth' "${S3_MODEL_DIR}" ./model
fi
if [ -n "${S3_DATABASE_DIR}" ]; then
aws s3 sync --no-progress "${S3_DATABASE_DIR}" --exclude '*' --include '*es_material*' --include "*${bootleg_model}/*" --include '*emb_data*' --include '*wiki_entity_data*' ./database
fi
exec genienlp $@