Remove model after load to save space

This commit is contained in:
msqr1
2024-03-31 21:18:56 -07:00
parent 0cdc293bdd
commit c23340ee1f
6 changed files with 9 additions and 23 deletions

View File

@@ -7,24 +7,9 @@ VOSK=$(realpath vosk) &&
OPENFST=$(realpath openfst) &&
LIBARCHIVE=$(realpath libarchive) &&
CLAPACK_WASM=$(realpath clapack-wasm) &&
MAX_MEMORY=${MAX_MEMORY:-375mb} &&
MAX_THREADS=${MAX_THREADS:-1} &&
EMSDK=${EMSDK:-$(realpath emsdk)} &&
if [ ! -d $EMSDK ]; then
echo "Invalid EMSDK path"
exit 1
fi
if [ $MAX_THREADS -lt 1 ]; then
echo "MAX_THREAD must be greater than or equal to 1" &&
exit 1
fi
if ! [[ $MAX_MEMORY =~ ^[0-9]+([kmgt]b)?$ ]]; then
echo "MAX_MEMORY valid suffixes are kb, mb, gb, tb, none (bytes)" &&
exit 1
fi
MAX_MEMORY=${MAX_MEMORY:-300mb}
MAX_THREADS=${MAX_THREADS:-1}
EMSDK=${EMSDK:-$(realpath ../emsdk)}
. $EMSDK/emsdk_env.sh &&
cd $SRC &&