singularity
singularity copied to clipboard
%appinstall <app> -c /bin/bash is maybe not like %post -c /bin/bash
Type of issue unsure: syntax or version or incompatibility or environment
Description of issue I'm trying to integrate virtual environments (like here) with SCI-F Apps as suggested here). SingularityCE version 3.10 doesn't seem to like the syntax:
%appinstall cge -c /bin/bash
pip3 install virtualenv && mkdir /venv && virtualenv /venv/testing && source /venv/testing/bin/activate
in my definition file. since sudo singularity build ...
indicates that the -c /bin/bash is not being applied.
The relevant console output is "/.post.script: 10: source: not found"
The %appinstall
doesn't support specifying shell args like %post
because it is part of the implementation of SCIF:
https://sci-f.github.io/spec-v1
SCIF isn't specific to Singularity... you can create SCIF recipes to build Docker containers too. We don't want to add handling that isn't part of the spec, to avoid incompatibility with other tools implementing it.
You may want to ask on the SCIF repository if there is interest in the SCIF specification supporting a shell argument for the %appinstall
syntax.