Skip to content

How to enable socket authentication with singularity containers #226

@mattwarkentin

Description

@mattwarkentin

Hi @mschubert,

Where should I add CMQ_AUTH={{ auth }} in my Slurm template when running the workers inside a singularity container to avoid the warning shown below? I know it typically comes before the R command, but this caused issues with singularity.

Warning in private$fill_options(n_jobs = n_jobs, ...) :
  Add 'CMQ_AUTH={{ auth }}' to template to enable socket authentication

Here is my current template:

#!/usr/bin/bash

#SBATCH --job-name={{ job_name }}
#SBATCH --partition={{ partition }}
#SBATCH --nodelist={{ node }}
#SBATCH --time={{ time | 0 }}
#SBATCH --array=1-{{ n_jobs }}
#SBATCH --output={{ log_file | /dev/null }}
#SBATCH --error={{ log_file | /dev/null }}
#SBATCH --mem-per-cpu={{ memory | 4096 }}
#SBATCH --cpus-per-task={{ cores | 1 }}
#SBATCH --export=ALL

module load singularity

ulimit -v $(( 1024 * {{ memory | 4096 }} ))
singularity exec cv-na.sif R --no-save --no-restore -e 'clustermq:::worker("{{ master }}")'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions