Skip to content

Commit

Permalink
allow similtaneous runs on the same machine
Browse files Browse the repository at this point in the history
  • Loading branch information
stebo85 committed Jan 17, 2024
1 parent caf99c4 commit 55de0f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ fi

echo "saving docker image locally for singularity to convert:"
# cleanup first
if [ -f "image.tar" ]; then
rm -rf image.tar
if [ -f "${IMAGENAME}_${BUILDDATE}.tar" ]; then
rm -rf ${IMAGENAME}_${BUILDDATE}.tar
fi
docker save $IMAGEID:$SHORT_SHA -o image.tar
docker save $IMAGEID:$SHORT_SHA -o ${IMAGENAME}_${BUILDDATE}.tar

if [ -f "$IMAGE_HOME/${IMAGENAME}_${BUILDDATE}.simg" ]; then
rm -rf $IMAGE_HOME/${IMAGENAME}_${BUILDDATE}.simg
fi
singularity build "$IMAGE_HOME/${IMAGENAME}_${BUILDDATE}.simg" docker-archive://image.tar
singularity build "$IMAGE_HOME/${IMAGENAME}_${BUILDDATE}.simg" docker-archive://${IMAGENAME}_${BUILDDATE}.tar

# cleanup
if [ -f "image.tar" ]; then
rm -rf image.tar
if [ -f "${IMAGENAME}_${BUILDDATE}.tar" ]; then
rm -rf ${IMAGENAME}_${BUILDDATE}.tar
fi

if [ -n "${ORACLE_USER}" ]; then
Expand Down

0 comments on commit 55de0f5

Please sign in to comment.