From 461bba3a5a467ed45e5f11991b9c2acc8f115df0 Mon Sep 17 00:00:00 2001 From: Robert Rosca <32569096+RobertRosca@users.noreply.github.com> Date: Tue, 4 Nov 2025 11:35:03 +0100 Subject: [PATCH] add hhg-studio application --- .gitignore | 1 + applications/hhg-studio/Dockerfile | 52 ++++++++++++++++++++++++++++++ applications/hhg-studio/Makefile | 11 +++++++ applications/hhg-studio/Modulefile | 13 ++++++++ modules/hhg-studio | 1 + 5 files changed, 78 insertions(+) create mode 100644 applications/hhg-studio/Dockerfile create mode 100644 applications/hhg-studio/Makefile create mode 100644 applications/hhg-studio/Modulefile create mode 120000 modules/hhg-studio diff --git a/.gitignore b/.gitignore index 03033104..77576d2b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ site/ *~ environments/*/julia-exfel-sysimage.so +applications/hhg-studio/hhg-studio.sif diff --git a/applications/hhg-studio/Dockerfile b/applications/hhg-studio/Dockerfile new file mode 100644 index 00000000..e1efa008 --- /dev/null +++ b/applications/hhg-studio/Dockerfile @@ -0,0 +1,52 @@ +# Base image with workdir and apt (update/install) caching +FROM ubuntu AS base + +WORKDIR /opt/hhg-studio + +RUN < /etc/apt/apt.conf.d/keep-cache +EOT + +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + apt update + + +# Stage for pulling the hhg-studio snap package and +# extracting the squashfs root +FROM base AS snap + +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + apt update && apt install --no-install-recommends -y snapd squashfs-tools + +RUN snap download hhg-studio + +RUN unsquashfs hhg-studio_*.snap + + +FROM base + +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + apt update && apt install -y --no-install-recommends qtbase5-dev libpng-dev libglib2.0-dev + +COPY --from=snap /opt/hhg-studio/squashfs-root ./squashfs-root + +# Define environment vars used by snap (launch.sh script) +#ENV WAYLAND_DISABLE=1 +#ENV QT_DEBUG_PLUGINS=1 +ENV SNAP_ARCH=amd64 +ENV RUNTIME=/opt/hhg-studio/squashfs-root +ENV SNAP=/opt/hhg-studio/squashfs-root +ENV SNAP_USER_COMMON=/tmp/hhg-studio/common +ENV SNAP_USER_DATA=/tmp/hhg-studio/home + +RUN <