Questions tagged [singularity-container]

For questions about programmatic problems relating to the Singularity scientific computing container solution.

Singularity is a container solution created by necessity for scientific and application driven workloads. Singularity provides four primary functions (taken from the preceding link):

  1. Mobility of compute: the ability to define, create and maintain a workflow and be confident that the workflow can be executed on different hosts, operating systems (as long as it is Linux) and service providers.
  2. Reproducibility: once a contained workflow has been defined, the container image can be snapshotted, archived, and locked down such that it can be used later and you can be confident that the code within the container has not changed.
  3. User freedom: users can define their own working environment and literally copy that environment image (single file) to a shared resource, and run their workflow inside that image.
  4. Support on existing traditional HPC: Singularity supports existing and traditional HPC resources as easily as installing a single package onto the host operating system. Custom configurations may be achieved via a single configuration file, and the defaults are tuned to be generally applicable for shared environments.
365 questions
3
votes
1 answer

How to run singularity container on HPC cluster? - ERROR : Failed to create user namespace: user namespace disabled

I'm trying to launch a singularity container on a hpc cluster. I have been running the projectNetv2.sif and sandbox on my local with no issue. After exporting them to a hpc I get the following error. (singularity) [me@hpc Project]$ ls examples …
Zizi96
  • 459
  • 1
  • 6
  • 23
3
votes
1 answer

Installing a specific version of R from an Apt repository

R volunteers currently maintain Ubuntu package repositories for R ~3.5 and ~4.0. For Bionic Beaver, these are: https://cloud.r-project.org/bin/linux/ubuntu/bionic-cran35/ https://cloud.r-project.org/bin/linux/ubuntu/bionic-cran40/ I am building…
Xophmeister
  • 8,884
  • 4
  • 44
  • 87
3
votes
1 answer

ImageMagick convert OOMing inside Singularity container

When I run a specific ImageMagick convert command (to produce an animated GIF) inside a Singularity container it is consistently giving an memory error: convert-im6.q16: cache resources exhausted `foo.gif' @…
sligocki
  • 6,246
  • 5
  • 38
  • 47
3
votes
1 answer

difference between working directory of docker and singularity

I have a very basic question about docker and singularity. I'd like to be able to run a docker container using both docker and singularity, but I'm confused about the difference between the working directory. Here's an example: INSIDE my docker…
Giulia B.
  • 31
  • 1
  • 3
3
votes
0 answers

Rule in snakemake using singularity: unterminated quoted string

I'm running a snakemake pipeline that for a specific rule loads a container: rule counts: params: transcriptome=os.environ["INDEX"], outdir= (os.environ["OUTDIR"] + "/counts/"), indir= (os.environ["INDIR"] + "{sample}"), name =…
compuTE
  • 120
  • 1
  • 10
3
votes
1 answer

Singularity behaviour: shell vs exec

So I'm trying to debug an error I got on an HPC setup I have access to. I won't go into details about the error since it's package specific and I'm pretty sure this is an environment variable kind of problem. That said the package is neuron, and if…
bidby
  • 708
  • 1
  • 10
  • 24
3
votes
1 answer

How to use Singularity in docker container?

I have a question about the official Snakemake container image. https://hub.docker.com/r/snakemake/snakemake/dockerfile In this Dockerfile, singularity will be installed. As far as I know, the --privileged argument seems to be required to use…
tetsuro90
  • 41
  • 5
3
votes
1 answer

Building v2-compatible Singularity images with the version 3 of Singularity

When I create .sif images from a sandbox folder with the Singularity version 3.2.0, I receive the following error when running on another machine with Singularity version 2.6: ERROR : Unknown image format/type: container_name.sif ABORT : Retval…
Arman
  • 927
  • 3
  • 12
  • 32
3
votes
0 answers

Snakemake & singularity, making different mounts available to each rule

I have been using singularity with some of my workflows and it works great so far. I have a question about binding directories. I can pass singularity arguments when running the snakemake workflow like: snakemake --use-singularity --singularity-args…
Jon Chung
  • 145
  • 5
3
votes
1 answer

Singularity: What is the difference between an image, a container, and an instance?

I am starting to learn Singularity for reproducible analysis of scientific pipelines. A colleague explained that an image was used to instantiate a container. However, in reading through the documentation and tutorials, the term instance is also…
Fiver
  • 9,909
  • 9
  • 43
  • 63
3
votes
1 answer

Automatically source configuration when running Singularity container with "shell" command

I use a Singularity/Apptainer container (build from a definition file) to build the code of my project. The way I use it is to run the container with singularity shell my_container.sif such that my workspace is mounted in the container and then run…
luator
  • 4,769
  • 3
  • 30
  • 51
3
votes
2 answers

Different python versions when exec and when building image with singularity, the same official python docker image

I'm trying to create a singularity image based on docker://python:3.7-buster. In the %post section, when I run /usr/bin/env python3 a different version of python is used than when I singularity exec the same thing. Here is my test definition file: $…
bli
  • 7,549
  • 7
  • 48
  • 94
3
votes
1 answer

Activate conda environment in singularity container from dockerfile

I'm trying to set up a singularity container from an existing docker image in which a conda environment named "tensorflow" is activated as soon as I run the container. I've found some answers on this topic here. Unfortunately, in this post they only…
Constih
  • 145
  • 2
  • 8
3
votes
0 answers

Local singularity image in snakemake workflow on AWS eks with --kubernetes option

I am trying to use Snakemake on AWS EKS, running shell commands in singularity containers. If I understood correctly, Snakemake is then run as a container itself by kubernetes, so I would run a singularity container inside a Pod. I have a ubuntu…
meo
  • 31
  • 1
3
votes
3 answers

How to build/run container with writable file system using Singularity 3?

I am using Singularity 3.0 and trying to pull a container image from DockerHub and run it on a university cluster. I followed this recipe to get started. singularity pull --name rstudio-3.5.2.sif docker://rocker/rstudio:3.5.2 singularity exec…
davidrpugh
  • 4,363
  • 5
  • 32
  • 46
1 2
3
24 25