Loading Builder/scripts/docker-builder-backend.sh +19 −6 Original line number Diff line number Diff line Loading @@ -19,20 +19,33 @@ case ${i} in esac done # Provide read-only access to gitlab registry and dockerhub # Provide read only access to the private gitlab docker repository if using the container-recipes docker registry grep 'FROM code.ornl.gov:4567' ./container.def GREP_RC=$? if [[ ${GREP_RC} -eq 0 ]] ; then echo "Using OLCF Gitlab registry login credentials" docker ${DEBUG_FLAG} login code.ornl.gov:4567 -u ${GITLAB_READONLY_USERNAME} -p ${GITLAB_READONLY_TOKEN} fi # provide read only access to the private olcf dockerhub repository grep 'FROM olcf/' ./container.def GREP_RC=$? if [[ ${GREP_RC} -eq 0 ]] ; then echo "Using OLCF Dockerhub registry login credentials" docker ${DEBUG_FLAG} login code.ornl.gov:4567 -u ${DOCKERHUB_READONLY_USERNAME} -p ${DOCKERHUB_READONLY_TOKEN} fi # Spin up local registry docker ${DEBUG_FLAG} run -d -p 5000:5000 --restart=always --name registry registry:2 # Build the Dockerfile docker image in the current directory mv ./container.def Dockerfile docker ${DEBUG_FLAG} build -t localhost:5000/docker_image . docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . # Push to the local registry docker ${DEBUG_FLAG} push localhost:5000/docker_image docker ${DEBUG_FLAG} push localhost:5000/docker_image:latest # Build the singularity container from the docker image export SINGULARITY_CACHEDIR=/home/builder/.singularity singularity ${DEBUG_FLAG} pull --name container.simg docker://localhost:5000/docker_image No newline at end of file export SINGULARITY_NOHTTPS=true singularity ${DEBUG_FLAG} pull --name container.simg docker://localhost:5000/docker_image:latest No newline at end of file Deployment/deploy-summitdev.sh +1 −3 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ source ${MODULESHOME}/init/bash export PATH=$PATH:${MODULESHOME}/bin module unload xalt module load gcc module load cmake/3.9.2 set -x Loading Loading @@ -39,7 +38,7 @@ make make install # Generate a public modulefile MF_ROOT=/sw/summitdev/modulefiles/container-builder MF_ROOT=/sw/summitdev/modulefiles/core/container-builder mkdir -p ${MF_ROOT} # Grab latest queue host Loading @@ -51,7 +50,6 @@ cat << EOF > ${MF_ROOT}/${VERSION} setenv QUEUE_HOST ${QUEUE_HOST} setenv QUEUE_PORT 8080 module load gcc prepend-path LD_LIBRARY_PATH ${SW_ROOT}/lib prepend-path PATH ${SW_ROOT}/bin EOF No newline at end of file Loading
Builder/scripts/docker-builder-backend.sh +19 −6 Original line number Diff line number Diff line Loading @@ -19,20 +19,33 @@ case ${i} in esac done # Provide read-only access to gitlab registry and dockerhub # Provide read only access to the private gitlab docker repository if using the container-recipes docker registry grep 'FROM code.ornl.gov:4567' ./container.def GREP_RC=$? if [[ ${GREP_RC} -eq 0 ]] ; then echo "Using OLCF Gitlab registry login credentials" docker ${DEBUG_FLAG} login code.ornl.gov:4567 -u ${GITLAB_READONLY_USERNAME} -p ${GITLAB_READONLY_TOKEN} fi # provide read only access to the private olcf dockerhub repository grep 'FROM olcf/' ./container.def GREP_RC=$? if [[ ${GREP_RC} -eq 0 ]] ; then echo "Using OLCF Dockerhub registry login credentials" docker ${DEBUG_FLAG} login code.ornl.gov:4567 -u ${DOCKERHUB_READONLY_USERNAME} -p ${DOCKERHUB_READONLY_TOKEN} fi # Spin up local registry docker ${DEBUG_FLAG} run -d -p 5000:5000 --restart=always --name registry registry:2 # Build the Dockerfile docker image in the current directory mv ./container.def Dockerfile docker ${DEBUG_FLAG} build -t localhost:5000/docker_image . docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . # Push to the local registry docker ${DEBUG_FLAG} push localhost:5000/docker_image docker ${DEBUG_FLAG} push localhost:5000/docker_image:latest # Build the singularity container from the docker image export SINGULARITY_CACHEDIR=/home/builder/.singularity singularity ${DEBUG_FLAG} pull --name container.simg docker://localhost:5000/docker_image No newline at end of file export SINGULARITY_NOHTTPS=true singularity ${DEBUG_FLAG} pull --name container.simg docker://localhost:5000/docker_image:latest No newline at end of file
Deployment/deploy-summitdev.sh +1 −3 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ source ${MODULESHOME}/init/bash export PATH=$PATH:${MODULESHOME}/bin module unload xalt module load gcc module load cmake/3.9.2 set -x Loading Loading @@ -39,7 +38,7 @@ make make install # Generate a public modulefile MF_ROOT=/sw/summitdev/modulefiles/container-builder MF_ROOT=/sw/summitdev/modulefiles/core/container-builder mkdir -p ${MF_ROOT} # Grab latest queue host Loading @@ -51,7 +50,6 @@ cat << EOF > ${MF_ROOT}/${VERSION} setenv QUEUE_HOST ${QUEUE_HOST} setenv QUEUE_PORT 8080 module load gcc prepend-path LD_LIBRARY_PATH ${SW_ROOT}/lib prepend-path PATH ${SW_ROOT}/bin EOF No newline at end of file