From 1230156928b025cabb53319657c9852fae326247 Mon Sep 17 00:00:00 2001 From: AdamSimpson Date: Mon, 5 Feb 2018 13:03:33 -0500 Subject: [PATCH] Hopefully a quick fix for retry issue --- Builder/scripts/docker-builder-backend.sh | 12 ++++++------ BuilderQueue/include/BuilderQueue.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Builder/scripts/docker-builder-backend.sh b/Builder/scripts/docker-builder-backend.sh index 4b28ffa..5040e01 100755 --- a/Builder/scripts/docker-builder-backend.sh +++ b/Builder/scripts/docker-builder-backend.sh @@ -31,7 +31,7 @@ grep 'FROM code.ornl.gov:4567' ./container.def GREP_RC=$? if [[ ${GREP_RC} -eq 0 ]] ; then echo "Using OLCF Gitlab registry login credentials" - /usr/local/bindocker login code.ornl.gov:4567 -u ${GITLAB_READONLY_USERNAME} -p ${GITLAB_READONLY_TOKEN} 2>&1 >&${OUT_FD} + docker login code.ornl.gov:4567 -u ${GITLAB_READONLY_USERNAME} -p ${GITLAB_READONLY_TOKEN} 2>&1 >&${OUT_FD} fi # provide read only access to the private olcf dockerhub repository @@ -39,24 +39,24 @@ grep 'FROM olcf/' ./container.def GREP_RC=$? if [[ ${GREP_RC} -eq 0 ]] ; then echo "Using OLCF Dockerhub registry login credentials" - /usr/local/bin/docker login -u ${DOCKERHUB_READONLY_USERNAME} -p ${DOCKERHUB_READONLY_TOKEN} 2>&1 >&${OUT_FD} + docker login -u ${DOCKERHUB_READONLY_USERNAME} -p ${DOCKERHUB_READONLY_TOKEN} 2>&1 >&${OUT_FD} fi # Spin up local registry -/usr/local/bin/docker ${DEBUG_FLAG} run -d -p 5000:5000 --restart=always --name registry registry:2 2>&1 >&${OUT_FD} +docker ${DEBUG_FLAG} run -d -p 5000:5000 --restart=always --name registry registry:2 2>&1 >&${OUT_FD} # Build the Dockerfile docker image in the current directory mv ./container.def Dockerfile -/usr/bin/unbuffer /usr/local/bin/docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . || { echo 'Build Failed' ; exit 1; } +docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . || { echo 'Build Failed' ; exit 1; } # Push to the local registry -/usr/local/bin/docker ${DEBUG_FLAG} push localhost:5000/docker_image:latest +docker ${DEBUG_FLAG} push localhost:5000/docker_image:latest # Build the singularity container from the docker image export SINGULARITY_CACHEDIR=/home/builder/.singularity export SINGULARITY_NOHTTPS=true export SINGULARITY_PULLFOLDER=/home/builder -/usr/bin/unbuffer /usr/local/bin/singularity ${DEBUG_FLAG} pull --name container.simg docker://localhost:5000/docker_image:latest +singularity ${DEBUG_FLAG} pull --name container.simg docker://localhost:5000/docker_image:latest # Workaround for PULLFOLDER not being respected: https://github.com/singularityware/singularity/pull/855 if [ -e ${SINGULARITY_CACHEDIR}/container.simg ] ; then diff --git a/BuilderQueue/include/BuilderQueue.h b/BuilderQueue/include/BuilderQueue.h index 39fedac..a444f40 100644 --- a/BuilderQueue/include/BuilderQueue.h +++ b/BuilderQueue/include/BuilderQueue.h @@ -52,8 +52,8 @@ class BuilderQueue { // Create reserve builders as needed void create_reserve_builders(); - // Wrappers to persist timer if retrying command due to error, this should be needed on newer compilers - // This is a mess that needs fixed + // Wrappers to persist timer if retrying command due to error + // std::bind doesn't handle overloads and so wrappers seem necessary void retry_return_builder(BuilderData builder, std::shared_ptr >& ignore) { return_builder(builder); }