Skip to content
Snippets Groups Projects
Unverified Commit acee5ab3 authored by Daniel Ecer's avatar Daniel Ecer Committed by GitHub
Browse files

avoid gzip transport encoding when uploading model (#16)

parent a8746521
No related branches found
No related tags found
No related merge requests found
......@@ -22,11 +22,20 @@ fi
if [ ! -d "${GROBID_HOME}" ]; then
echo "no grobid home found (have you trained a model yet?)"
exit 1
fi
echo "uploading ${MODEL_NAME} model to ${CLOUD_MODELS_PATH}"
gsutil cp -Z "${GROBID_HOME}/models/${MODEL_NAME}/model.wapiti" \
"${CLOUD_MODELS_PATH}/${MODEL_NAME}/model.wapiti.gz"
LOCAL_MODEL_FILE="${GROBID_HOME}/models/${MODEL_NAME}/model.wapiti"
if [ ! -f "${LOCAL_MODEL_FILE}" ]; then
echo "model file not found: ${LOCAL_MODEL_FILE}"
exit 2
fi
cat "${LOCAL_MODEL_FILE}" \
| gzip \
| gsutil cp - "${CLOUD_MODELS_PATH}/${MODEL_NAME}/model.wapiti.gz"
gsutil ls -l "${CLOUD_MODELS_PATH}/${MODEL_NAME}"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment