forked from Samsung/ONE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker_build_test_x64.sh
executable file
·51 lines (39 loc) · 1.37 KB
/
docker_build_test_x64.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
[[ "${BASH_SOURCE[0]}" != "${0}" ]] && echo "Please don't source ${BASH_SOURCE[0]}, execute it" && return
CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_PATH="$CURRENT_PATH/../../"
# mount volume (or directory) for externals
if [ -n "$EXTERNAL_VOLUME" ]; then
DOCKER_VOLUMES+=" -v $EXTERNAL_VOLUME:/externals"
DOCKER_ENV_VARS+=" -e EXTERNAL_VOLUME=/externals"
else
echo "It will use default external path"
fi
# docker image name
# - for bionic, use DOCKER_IMAGE_NAME="nnfw/one-devtools:bionic"
# - for focal, use DOCKER_IMAGE_NAME="nnfw/one-devtools:focal"
if [[ -z $DOCKER_IMAGE_NAME ]]; then
echo "It will use default docker image name"
fi
# Mirror server setting
if [[ -z $EXTERNAL_DOWNLOAD_SERVER ]]; then
echo "It will not use mirror server"
fi
set -e
pushd $ROOT_PATH > /dev/null
export DOCKER_ENV_VARS
export DOCKER_VOLUMES
export BUILD_OPTIONS
CMD="export BUILD_TYPE=Release && \
cp -nv Makefile.template Makefile && \
make all install build_test_suite"
./nnfw docker-run bash -c "$CMD"
# Model download server setting
if [[ -z $MODELFILE_SERVER ]]; then
echo "Need model file server setting"
exit 1
fi
export DOCKER_ENV_VARS=" -e MODELFILE_SERVER=$MODELFILE_SERVER"
./nnfw docker-run-user ./infra/scripts/test_ubuntu_runtime.sh --backend cpu
./nnfw docker-run-user ./infra/scripts/test_ubuntu_runtime.sh --interp
popd > /dev/null