You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by mo...@apache.org on 2023/06/24 08:46:37 UTC
[tvm] branch main updated: [Docker] Fix build.sh environment variables (#15149)
This is an automated email from the ASF dual-hosted git repository.
mousius pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 8c297a63c5 [Docker] Fix build.sh environment variables (#15149)
8c297a63c5 is described below
commit 8c297a63c5fcb4e30532a914ae6ca649618580ff
Author: neildhickey <ne...@arm.com>
AuthorDate: Sat Jun 24 09:46:30 2023 +0100
[Docker] Fix build.sh environment variables (#15149)
The build.sh script was not actually passing the environment variable to the docker image.
---
docker/build.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/docker/build.sh b/docker/build.sh
index 8776bdeb0d..539531ef76 100755
--- a/docker/build.sh
+++ b/docker/build.sh
@@ -58,6 +58,8 @@
#
# COMMAND (optional): Command to be executed in the docker container
#
+
+DOCKER_ENV=()
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Get the command line arguments.
@@ -80,8 +82,8 @@ if [[ "$1" == "--dockerfile" ]]; then
fi
if [[ "$1" == "--env" ]]; then
- ENVIRONMENT_VARIABLE="$2"
- echo "Setting environment variable: $ENVIRONMENT_VARIABLE"
+ DOCKER_ENV+=( --env "$2" )
+ echo "Setting environment variable: $2"
shift 2
fi
@@ -249,6 +251,7 @@ if [[ -n ${COMMAND} ]]; then
-e "CI_PYTEST_ADD_OPTIONS=$CI_PYTEST_ADD_OPTIONS" \
-e "CI_IMAGE_NAME=${DOCKER_IMAGE_NAME}" \
-e "PLATFORM=${PLATFORM}" \
+ ${DOCKER_ENV[@]+"${DOCKER_ENV[@]}"} \
${CUDA_ENV}\
${CI_DOCKER_EXTRA_PARAMS[@]} \
${DOCKER_IMG_SPEC} \