Loading Builder/scripts/docker-builder-backend.sh +9 −5 Original line number Diff line number Diff line Loading @@ -2,13 +2,17 @@ source /home/builder/environment.sh # Test for any arguments, such as --debug # Test for any arguments for i in "$@" do case ${i} in --debug) DEBUG_FLAG='--debug' shift # past argument with no value shift ;; --tty) TTY='/usr/bin/unbuffer' shift ;; *) echo "unknown argument to singularity-builder-backend.sh" Loading Loading @@ -45,13 +49,13 @@ docker ${DEBUG_FLAG} run -d -p 5000:5000 --restart=always --name registry regist # Build the Dockerfile docker image in the current directory mv ./container.def Dockerfile /usr/bin/unbuffer /usr/bin/docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . || { echo 'Build Failed' ; exit 1; } ${TTY} /usr/bin/docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . || { echo 'Build Failed' ; exit 1; } # Push to the local registry /usr/bin/unbuffer /usr/bin/docker ${DEBUG_FLAG} push localhost:5000/docker_image:latest ${TTY} /usr/bin/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 # Needed as we're pulling from localhost export SINGULARITY_PULLFOLDER=/home/builder /usr/bin/unbuffer /usr/local/bin/singularity ${DEBUG_FLAG} build container.simg docker://localhost:5000/docker_image:latest No newline at end of file ${TTY} /usr/local/bin/singularity ${DEBUG_FLAG} build container.simg docker://localhost:5000/docker_image:latest No newline at end of file Builder/scripts/singularity-builder-backend.sh +7 −3 Original line number Diff line number Diff line Loading @@ -2,13 +2,17 @@ source /home/builder/environment.sh # Test for any arguments, such as --debug # Test for any arguments for i in "$@" do case ${i} in --debug) DEBUG_FLAG='--debug' shift # past argument with no value shift ;; --tty) TTY='/usr/bin/unbuffer' shift ;; *) echo "unknown argument to singularity-builder-backend.sh" Loading Loading @@ -36,4 +40,4 @@ if [[ ${GREP_RC} -eq 0 ]] ; then fi export SINGULARITY_CACHEDIR=/home/builder/.singularity /usr/bin/unbuffer /usr/local/bin/singularity ${DEBUG_FLAG} build ./container.simg ./container.def No newline at end of file ${TTY} /usr/local/bin/singularity ${DEBUG_FLAG} build ./container.simg ./container.def No newline at end of file Builder/src/main.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,11 @@ std::string build_command(const ClientData &client_data) { build_command += " --debug"; } // Enable pseudo tty if (client_data.tty) { build_command += " --tty"; } Logger::info("Build command prepared: " + build_command); return build_command; Loading Loading
Builder/scripts/docker-builder-backend.sh +9 −5 Original line number Diff line number Diff line Loading @@ -2,13 +2,17 @@ source /home/builder/environment.sh # Test for any arguments, such as --debug # Test for any arguments for i in "$@" do case ${i} in --debug) DEBUG_FLAG='--debug' shift # past argument with no value shift ;; --tty) TTY='/usr/bin/unbuffer' shift ;; *) echo "unknown argument to singularity-builder-backend.sh" Loading Loading @@ -45,13 +49,13 @@ docker ${DEBUG_FLAG} run -d -p 5000:5000 --restart=always --name registry regist # Build the Dockerfile docker image in the current directory mv ./container.def Dockerfile /usr/bin/unbuffer /usr/bin/docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . || { echo 'Build Failed' ; exit 1; } ${TTY} /usr/bin/docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . || { echo 'Build Failed' ; exit 1; } # Push to the local registry /usr/bin/unbuffer /usr/bin/docker ${DEBUG_FLAG} push localhost:5000/docker_image:latest ${TTY} /usr/bin/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 # Needed as we're pulling from localhost export SINGULARITY_PULLFOLDER=/home/builder /usr/bin/unbuffer /usr/local/bin/singularity ${DEBUG_FLAG} build container.simg docker://localhost:5000/docker_image:latest No newline at end of file ${TTY} /usr/local/bin/singularity ${DEBUG_FLAG} build container.simg docker://localhost:5000/docker_image:latest No newline at end of file
Builder/scripts/singularity-builder-backend.sh +7 −3 Original line number Diff line number Diff line Loading @@ -2,13 +2,17 @@ source /home/builder/environment.sh # Test for any arguments, such as --debug # Test for any arguments for i in "$@" do case ${i} in --debug) DEBUG_FLAG='--debug' shift # past argument with no value shift ;; --tty) TTY='/usr/bin/unbuffer' shift ;; *) echo "unknown argument to singularity-builder-backend.sh" Loading Loading @@ -36,4 +40,4 @@ if [[ ${GREP_RC} -eq 0 ]] ; then fi export SINGULARITY_CACHEDIR=/home/builder/.singularity /usr/bin/unbuffer /usr/local/bin/singularity ${DEBUG_FLAG} build ./container.simg ./container.def No newline at end of file ${TTY} /usr/local/bin/singularity ${DEBUG_FLAG} build ./container.simg ./container.def No newline at end of file
Builder/src/main.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,11 @@ std::string build_command(const ClientData &client_data) { build_command += " --debug"; } // Enable pseudo tty if (client_data.tty) { build_command += " --tty"; } Logger::info("Build command prepared: " + build_command); return build_command; Loading