Last active
February 19, 2021 12:27
-
-
Save elowy01/3043a3dd8574993cef5d58d4d4afa95d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a Singularity image from a Docker image that is in the Docker hub | |
// where /tmp/ is the folder where the image will be created and ubuntu:14.04 | |
// is the docker image used to convert to the Singularity image | |
docker run \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /tmp/:/output \ | |
--privileged -t --rm \ | |
singularityware/docker2singularity \ | |
ubuntu:14.04 | |
// | |
#Creating a singularity image from a docker image in docker hub: | |
singularity pull docker://elowy01/variant_filtering | |
# Then, we see that there will be a new file named file.simg containing the pulled image | |
# and we can run the pulled container by doing: | |
singularity run file.simg | |
// | |
#building a prebuilt docker image: | |
singularity build variant_filtering.simg docker://elowy01/variant_filtering | |
#where 'variant_filtering.simg' is the name that will be given to the image file | |
// | |
# Print all running container instances | |
singularity instance.list | |
// | |
#running a certain image | |
singularity run docker://elowy01/variant_filtering | |
// | |
# open an interactive shell using a certain image | |
singularity shell variant_filtering.simg | |
// | |
# Knowing the singularity cachedir: | |
echo $SINGULARITY_CACHEDIR | |
# This cachedir will be used to store the docker images pulled from dockerhub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment