Scroll to navigation

DEB2APPTAINER(1) DEB2APPTAINER(1)

BEZEICHNUNG

deb2apptainer - Build a Singularity/Apptainer image with given Debian packages

ÜBERSICHT

deb2apptainer [-hB][-c CMD][-f FROM][-n NAME][-o DIR][-p deb2singularity [-hB][-c CMD][-f FROM][-n NAME][-o DIR][-p PRE_SCRIPT][-s POST_SCRIPT] packages

BESCHREIBUNG

deb2apptainer is a simple script which takes as input a list of Debian packages and generates automatically a Singularity/Apptainer container including these packages. A set of freedesktop.org desktop launchers are also generated based on the .desktop and icon files found in the packages. In addition, a desktop launcher is created to start the container in a Terminal.

This tool is suited for deploying applications as containers, as well as for testing Debian packages in a sandbox.

OPTIONEN

do NOT build the image (default is to build). A build script is generated in the DIR target directory.
Command to run in the container (default to /bin/bash).
Distribution is to be used (default to debian:stable).
Show this help
Name of the image (default is built from the package list).
Use given directory DIR for the build (default is in /tmp).
Execute the given script PRE_SCRIPT before packages install.
Execute the given script POST_SCRIPT after packages install.
The package list can be any Debian package, as well as local .deb files.

DATEIEN

DIR/README
DIR/image.def
DIR/image.sif
DIR/launchers/
DIR/icons/
DIR/build
DIR/start

ANMERKUNGEN

You obviously require to have apptainer installed.

Get the Debian package at: - https://apptainer.org/docs/admin/main/installation.html#install-debian-packages

Usual commands typically used to handle Apptainer/Singularity containers are:

apptainer build image.sif
apptainer run image.sif apptainer run –nv image.sif # with NVIDIA GPU pass-through
apptainer inspect image.sif
apptainer sif header image.sif
apptainer sif list image.sif

BEISPIELE

deb2apptainer -o /tmp/xeyes x11-apps
/tmp/xeyes/start xeyes

A Desktop launcher is created as /tmp/xeyes/launchers/x11-apps-terminal.desktop

deb2apptainer x11-apps meshlab
echo “sed -i `s/main/main contrib non-free/g' /etc/apt/sources.list” > pre.sh
deb2apptainer -p pre.sh x11-apps
echo “echo `deb http://deb.debian.org/debian bullseye main contrib non-free' >> /etc/apt/sources.list” > pre-script.sh
deb2apptainer -n pyhst2 -f debian:bullseye -p pre-script.sh -o /tmp/apptainer-pyhst2/ python3-pyhst2-cuda nvidia-smi nvidia-cuda-toolkit
apptainer run –nv /tmp/apptainer-pyhst2/pyhst2.sif nvidia-smi ```

AUTOREN

Emmanuel Farhi (emmanuel.farhi@synchrotron-soleil.fr)

SIEHE AUCH

deb2docker(1), distrobox-create(1), distrobox-enter(1), docker(1), apptainer(1)

AUTOREN

Emmanuel Farhi.

ÜBERSETZUNG

Diese Übersetzung wurde mit dem Werkzeug po4a <URL:https://po4a.org/> durch Chris Leick c.leick@vollbio.de im Juli 2012 erstellt und vom deutschen Debian-Übersetzer-Team korrekturgelesen. Bitte melden Sie alle Fehler in der Übersetzung an debian-l10n-german@lists.debian.org oder als Fehlerbericht an das Paket devscripts. Sie können mit dem folgenden Befehl das englische Original anzeigen »man -L C Abschnitt deutsche_Handbuchseite«.

February 2024