mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-15 00:03:06 +00:00
Introduce code from Rust monorepo. This is a mess
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
docker build . --rm -t sparrowhawk
|
||||
@@ -0,0 +1,44 @@
|
||||
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
MODE=${1:-"export"}
|
||||
SCRIPT_DIR=$(cd $(dirname $0); pwd)
|
||||
: ${CLASSIFY_DIR:="$SCRIPT_DIR/../classify"}
|
||||
: ${VERBALIZE_DIR:="$SCRIPT_DIR/../verbalize"}
|
||||
: ${CMD:=${2:-"/bin/bash"}}
|
||||
|
||||
MOUNTS=""
|
||||
MOUNTS+=" -v $CLASSIFY_DIR:/workspace/sparrowhawk/documentation/grammars/en_toy/classify"
|
||||
MOUNTS+=" -v $VERBALIZE_DIR:/workspace/sparrowhawk/documentation/grammars/en_toy/verbalize"
|
||||
|
||||
WORK_DIR="/workspace/sparrowhawk/documentation/grammars"
|
||||
if [[ $MODE == "test_tn_grammars" ]]; then
|
||||
CMD="bash test_sparrowhawk_normalization.sh"
|
||||
WORK_DIR="/workspace/tests"
|
||||
elif [[ $MODE == "test_itn_grammars" ]]; then
|
||||
CMD="bash test_sparrowhawk_inverse_text_normalization.sh"
|
||||
WORK_DIR="/workspace/tests"
|
||||
fi
|
||||
|
||||
echo $MOUNTS
|
||||
docker run -it --rm \
|
||||
--shm-size=4g \
|
||||
--ulimit memlock=-1 \
|
||||
--ulimit stack=67108864 \
|
||||
$MOUNTS \
|
||||
-v $SCRIPT_DIR/../../../tests/nemo_text_processing/:/workspace/tests \
|
||||
-w $WORK_DIR \
|
||||
sparrowhawk:latest $CMD
|
||||
Reference in New Issue
Block a user