From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YDh7KEng62OtWQAAbAwnHQ (envelope-from ) for ; Tue, 14 Feb 2023 20:26:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qKVSKEng62PfCQEA9RJhRA (envelope-from ) for ; Tue, 14 Feb 2023 20:26:01 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4187917336 for ; Tue, 14 Feb 2023 20:26:01 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=dfEJbJq2; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676402761; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=kl9fhTQxrpNrvT6Jik84U6kMw85SzX3kM/re5MgNe4I=; b=Dpu9V+055x5IuSND4sjKN7TBjCv5cb2Mz3iahiTfNtwJWZh6YKWrxYGZt8K4FrPeuT2Beq neyCZ0JS2EVUDJW6K6iKEZ9DA0HG1SctS8T7SgleIM7FgNRblLVO/x0GlIrprpCF4izPZN hTteIAslgZImQCEoBCl9V+zgFrZEYUYnoVVbatcb/8kKlT0UuE4bzGRUkIZDY4JaYdLLpe gbaRMnwQP/CBYEI7I5BS208748ai2iZhNlxl/XPU1GhF+Q2TieGeKW5ut5AlBNhIYatbFS 6bMLUUlYAZmEN0OU2RrTm1Qi+LbwbowHVdXw5MwUEuVm2OuEwnikRgzKfYWf9A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=dfEJbJq2; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676402761; a=rsa-sha256; cv=none; b=aefOn1lrg1cqrOSU0hBIjpFxedw0kmzYeOsTg2P/F97NIOdb9Br4RIUNHVUDPIYgdYZPLZ egOO8+IW60kRjjtfDsUoDqJBalTJdbTw7xxBvM3YMB4mdPbiWly67I7xRevwnrr2uDeqwL kgSJvKisydraiRb1cCVYApXv5qCh+M3LUYY6nFqnKO3peacAhTPH6tQdZfPVpAIWSCiKz1 3vcSBv4Ydkoye68qHbmr2Y4jnVG4+RPvQj6FsODsmXdC/TqWpKukDlQICYCDFzSsvo8kuE KtgM3umh+5UMU0XK27QKgmQL7mu2h+3uc/MjYTc0DeZ3qwvm9wdRpI44HVOG6g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pS0vp-0007Yv-9W; Tue, 14 Feb 2023 14:25:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pS0vT-0007Kw-1e for help-guix@gnu.org; Tue, 14 Feb 2023 14:25:18 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pS0vP-0005Qu-Rj for help-guix@gnu.org; Tue, 14 Feb 2023 14:25:14 -0500 Received: by mail-wm1-x32c.google.com with SMTP id m16-20020a05600c3b1000b003dc4050c94aso12398314wms.4 for ; Tue, 14 Feb 2023 11:25:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1676402710; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kl9fhTQxrpNrvT6Jik84U6kMw85SzX3kM/re5MgNe4I=; b=dfEJbJq2mKfJlIw4VDVPm9PRKrJOBHUnQNjVqRMZb8JDWK5OywOsycWPXrlTYohEF1 yR/C2Ep+FTm+8dtyc5TIW523qEjsFDCPzCRcYbmA6TBz8yZZg+zyMKs5oqPr/EbYW5Pd 6u8g0Wsdvg4hI0eScfbTdW15brM+qZY3AiUVl5byaE905XKx9uHV/kvdYmELD6ai27yI ZA0hHqiN9946RGZ1NfQuIb6FJGRYZxSvOQ7Mp8SPDHICrDjmvol1QU6hPT7+wK+3p1EC PIg52wxAIitkBepu2PDr0K1LjRBAH/HjF3w0IbX4DjxpFltyaN4T114q1wdnbef5fRFG pBuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676402710; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=kl9fhTQxrpNrvT6Jik84U6kMw85SzX3kM/re5MgNe4I=; b=zW+vw2ajzUwXYgzFICCS9VRPO2+2PwxDyfbEXBg/WjeoWpdGRHYNxwymd7EoV8UtlN IAX0smfm90sxjZKjUPGK9mpVuJUUoarEKJTeDIoqdyijvFnE3JWvl1LEALcr/o5UyzDE ceguZ4DjbvuOKzH5uUdKcxxuLICCMClexL/h4+8NVdXjdfRqdHHs5Au/UhQZ/hk542pU PVJiB4f1DxbYmIy8Y0Es5ta6BUvgPpgiRZ21J+xBoTbxxd8Ylf/BdvpR0aMg/Loxv2+t TItmrNJlV8G+gNDcwhQTQV0L9YHK33HvJRjBb//jPbbLwzGkVvePHd9JX9aKngW7gqVG cRRQ== X-Gm-Message-State: AO0yUKWYb4tnkYtW9DqCAnOO814vum2VKUQkFTx618z27pEyzmEWDNji rDP5BBTXYAWppRvHFAF7+cZ9kGtsrj0= X-Google-Smtp-Source: AK7set/7f60aOl2D+fW7wAw5YtbTX/ALQjRFDu5Iq0u3PgliLfvtyhIVCeBREgS84WkfBA0EHQlt+A== X-Received: by 2002:a05:600c:1c2a:b0:3db:2063:425e with SMTP id j42-20020a05600c1c2a00b003db2063425emr49997wms.1.1676402710224; Tue, 14 Feb 2023 11:25:10 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id h10-20020adfe98a000000b002c5501a5803sm8878940wrm.65.2023.02.14.11.25.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 11:25:09 -0800 (PST) From: Simon Tournier To: Kyle Andrews , help-guix@gnu.org Subject: Re: guix pack isolation In-Reply-To: <87wn4qgy6a.fsf@posteo.net> References: <87wn4qgy6a.fsf@posteo.net> Date: Tue, 14 Feb 2023 19:46:57 +0100 Message-ID: <874jroyti6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: X-Migadu-Queue-Id: 4187917336 X-Spam-Score: -8.33 X-Migadu-Spam-Score: -8.33 X-Migadu-Scanner: scn0.migadu.com List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: mWNjmn0Sepdt Hi, On ven., 10 f=C3=A9vr. 2023 at 00:25, Kyle Andrews wrote: > I am wondering how I can/should go about isolating containers created > using `guix pack`. Right now they are inheriting configurations from my > personal user folder. > > My system administrators are still quite skeptical about installing > Guix, but they have made it convenient to submit singularity container > jobs via SLURM. Otherwise, I would prefer to use `guix shell` because it > seems to make it easy to create a fully isolated container. >From my point of view, you have 2 options: relocatable or squashfs. About relocatable pack, you might be interested by: https://hpc.guix.info/blog/2020/05/faster-relocatable-packs-with-fakech= root/ About squashfs (Singularity container), you can try: guix pack -f squashfs python python-numpy bash-minimal -S /bin=3Dbin which will produce a compressed squashfs that you then import with Singularity. I do not have Singularity at hand, let demo with Docker which is very similar. 1. Produce the pack on the machine running Guix --8<---------------cut here---------------start------------->8--- $ guix pack -f docker python python-numpy bash -S /bin=3Dbin substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% The following derivations will be built: /gnu/store/nid89k59pcxkl6lg7mlppqk8qmizbn6p-python-python-numpy-bash-dock= er-pack.tar.gz.drv /gnu/store/jlib2ngiianwv6854c1kbl6zlgixxg48-module-import.drv /gnu/store/irsn92v5ykaxb4yrynrr45hp6jkd4cxc-profile.drv 1,2 MB will be downloaded substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% guile-json-3.5.0 44KiB 1.1MiB/s 00:00 [##################] 1= 00.0% module-import 1KiB 508KiB/s 00:00 [##################] 1= 00.0% building profile with 3 packages... module-import-compiled 1.1MiB 5.4MiB/s 00:00 [##################] 1= 00.0% building /gnu/store/nid89k59pcxkl6lg7mlppqk8qmizbn6p-python-python-numpy-ba= sh-docker-pack.tar.gz.drv... /gnu/store/i3hkgkjq672hic4nkn4g718b9sggg4rh-python-python-numpy-bash-docker= -pack.tar.gz --8<---------------cut here---------------end--------------->8--- 2. Transfer the produce pack (=E2=80=A6-docker-pack.tar.gz) to the machine = without Guix. 3. Load the pack and use it! --8<---------------cut here---------------start------------->8--- $ docker load < my-docker-pack.tar.gz Loaded image: python-python-numpy-bash:latest $ docker run -ti python-python-numpy-bash:latest python3 Python 3.9.9 (main, Jan 1 1970, 00:00:01)=20 [GCC 10.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np import numpy as np >>> A =3D np.array([[1,0,1],[0,1,0],[0,0,1]]); A =3D np.array([[1,0,1],[0,1,0],[0,0,1]]); >>> _, s, _ =3D np.linalg.svd(A); s; abs(s[0] - 1./s[2]) _, s, _ =3D np.linalg.svd(A); s; abs(s[0] - 1./s[2]) array([1.61803399, 1. , 0.61803399]) 0.0 >>>=20 --8<---------------cut here---------------end--------------->8--- Cheers, simon =20=20=20=20