Page MenuHomec4science

create_and_run_container_locally.sh
No OneTemporary

File Metadata

Created
Wed, Aug 28, 06:21

create_and_run_container_locally.sh

#!/usr/bin/env bash
IMAGE_NAME=hello_world_pipeline_light
# remove old container
rm -rf ${IMAGE_NAME}*.img
# build the Docker container using the "Dockerfile"
sudo docker build -t ${IMAGE_NAME} .
# convert the Docker container to a Singularity image
#sudo docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/output --privileged -t --rm singularityware/docker2singularity ${IMAGE_NAME}
#./docker2singularity.sh ${IMAGE_NAME}
sudo docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/output --privileged -t --rm my_docker2_singularity ${IMAGE_NAME}
# rename the image
mv ${IMAGE_NAME}*.img ${IMAGE_NAME}.img
# run the image with some binding
singularity run -B ./pipeline:/pipeline -B ./data:/data ${IMAGE_NAME}.img

Event Timeline