From 398bc7162f0ba203e1af3fe63d8ee28b833ba02e Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Fri, 19 Feb 2021 16:02:51 -0800 Subject: [PATCH] docker: download bootleg material on start as well --- dockerfiles/start.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dockerfiles/start.sh b/dockerfiles/start.sh index 475f4736..2891875f 100755 --- a/dockerfiles/start.sh +++ b/dockerfiles/start.sh @@ -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 $@