diff options
author | 오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com> | 2019-07-29 10:42:29 +0900 |
---|---|---|
committer | GitHub Enterprise <noreply-CODE@samsung.com> | 2019-07-29 10:42:29 +0900 |
commit | cb86186d5a6ffc4ba959593a046879981b5fbb4a (patch) | |
tree | 650dcc9ae4b3b519c166c404a45df9200633254a /infra/command | |
parent | f1338ebf23735dcccb12a8b6c6782b183555a3b1 (diff) | |
download | nnfw-cb86186d5a6ffc4ba959593a046879981b5fbb4a.tar.gz nnfw-cb86186d5a6ffc4ba959593a046879981b5fbb4a.tar.bz2 nnfw-cb86186d5a6ffc4ba959593a046879981b5fbb4a.zip |
Unified dockerfile (#5925)
Merge infra/nncc/Dockerfile, infra/nnfw/docker/Dockerfile, and infra/nnfw/docker/Dockerfile_tizen into infra/docker/Dockerfile
- Base ubuntu version: 16.04
- Use apt-get
- Native/cross gcc/g++ version: 6.x
- Update nncc/nnfw docker build documents
- Move infra/nnfw/command/build-docker command into infra/command and change name to build-docker-image
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
Diffstat (limited to 'infra/command')
-rw-r--r-- | infra/command/build-docker-image | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/infra/command/build-docker-image b/infra/command/build-docker-image new file mode 100644 index 000000000..ebbc9e572 --- /dev/null +++ b/infra/command/build-docker-image @@ -0,0 +1,46 @@ +#!/bin/bash + +function Usage() +{ + echo "Usage: $0 $(basename ${BASH_SOURCE[0]}) [OPTIONS]" + echo "" + echo "Options:" + echo " --tizen Build docker image for tizen build" + echo "Options can use as docker build option:" + docker build --help +} + +DOCKER_FILE_RPATH="docker/Dockerfile" +DOCKER_BUILD_ARGS=() + +# Handle argument for this script +# Set default docker image name, tag +for i in "$@" +do + case ${i} in + -h|--help|help) + Usage + exit 1 + ;; + esac +done + +DOCKER_BUILD_ARGS+="-t ${DOCKER_IMAGE_NAME:-nnas}" + +# Argument for docker build commands +for i in "$@" +do + case ${i} in + -h|--help|help) + # Already handled argument + ;; + *) + DOCKER_BUILD_ARGS+=(${i}) + ;; + esac +done + +docker build --build-arg http_proxy="${http_proxy}" \ + --build-arg https_proxy="${https_proxy}" \ + ${DOCKER_BUILD_ARGS[@]} \ + - < ${NNAS_SCRIPT_PATH}/${DOCKER_FILE_RPATH} |