Skip to content

Specifying --env-file returns a UID / GID readonly warning #1263

@jmmaljaars

Description

@jmmaljaars

Version of Singularity

singularity-ce version 3.10.2-bionic

Describe the bug

Whenever I attempt to pass environment variables to a singularity container using the --env-file option, the following warning is issued:

GID: readonly variable
UID: readonly variable

even if the --env-file is actually empty.

To Reproduce
Steps to reproduce the behavior:

  1. create a file containing the environment variables as key-value pairs, see https://docs.sylabs.io/guides/3.7/user-guide/environment_and_metadata.html#env-file-option , e.g.
echo MY_VAR=host_var > .env
  1. get an interactive singularity session, e.g.
singularity shell --env-file .env $SINGULARITY_CONTAINER

in which the $SINGULARITY_CONTAINER points to a valid .sif file.

Results in:

GID: readonly variable
UID: readonly variable
Singularity> echo $MY_VAR 
host_var

i.e. the variable is passed correctly, but I get an annoying GID / UID warning.

Expected behavior
I didn't expect the UID/GID readonly variable warnings.

OS / Linux Distribution
Which Linux distribution are you using?

Ubuntu 18.04.6 LTS

Installation Method
Installed by sysadmin, not sure which method he followed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions