diff --git a/ogscm/cli.py b/ogscm/cli.py index 05c7b1901f97bd1fecf4663bd2eed30261fb3a98..33c055c32a76e2f0c62615c4c4d8f3f6f92561ea 100644 --- a/ogscm/cli.py +++ b/ogscm/cli.py @@ -212,6 +212,18 @@ def main(): # pragma: no cover if "jupyter/base-notebook-ubuntu" in args.runtime_base_image: Stage1 += raw(docker="USER root") + # set timezone + packages_tz = packages(ospackages=["tzdata"]) + env_tz = environment(variables={"TZ": "Europe/Berlin"}) + shell_tz = shell( + commands=[ + "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime", + "dpkg-reconfigure -f noninteractive tzdata", + ] + ) + Stage0 += [packages_tz, env_tz, shell_tz] + Stage1 += [packages_tz, env_tz, shell_tz] + cwd = os.getcwd() img_file = "" out_dir = f"{args.out}/{args.format}" @@ -294,18 +306,6 @@ def main(): # pragma: no cover Stage0 += pip(packages=args.pip, pip="pip3") Stage1 += pip(packages=args.pip, pip="pip3") - # set timezone - packages_tz = packages(ospackages=["tzdata"]) - env_tz = environment(variables={"TZ": "Europe/Berlin"}) - shell_tz = shell( - commands=[ - "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime", - "dpkg-reconfigure -f noninteractive tzdata", - ] - ) - Stage0 += [packages_tz, env_tz, shell_tz] - Stage1 += [packages_tz, env_tz, shell_tz] - # Create definition hpccm.config.set_container_format(args.format) hpccm.config.set_singularity_version("3.5")