From 06b8abe0679b590043d4b2e139d2ee33efd61097 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Fri, 24 Nov 2023 15:39:30 +0100 Subject: [PATCH] Move timezone before recipes. --- ogscm/cli.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ogscm/cli.py b/ogscm/cli.py index 05c7b19..33c055c 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") -- GitLab