-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy_cpu.sh
More file actions
executable file
·31 lines (21 loc) · 844 Bytes
/
Copy pathdeploy_cpu.sh
File metadata and controls
executable file
·31 lines (21 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Sample commands to deploy nuclio functions on CPU
set -eu
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
FUNCTIONS_DIR=${1:-$SCRIPT_DIR}
export DOCKER_BUILDKIT=1
docker build -t cvat.openvino.base "$SCRIPT_DIR/openvino/base"
nuctl create project cvat --platform local
shopt -s globstar
for func_config in "$FUNCTIONS_DIR"/**/function.yaml
do
func_root="$(dirname "$func_config")"
func_rel_path="$(realpath --relative-to="$SCRIPT_DIR" "$(dirname "$func_root")")"
if [ -f "$func_root/Dockerfile" ]; then
docker build -t "cvat.${func_rel_path//\//.}.base" "$func_root"
fi
echo "Deploying $func_rel_path function..."
nuctl deploy --project-name cvat --path "$func_root" \
--file "$func_config" --platform local
done
nuctl get function --platform local