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 MDH3M8dK9WNZ5wAAbAwnHQ (envelope-from ) for ; Tue, 21 Feb 2023 23:50:47 +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 sGiQM8dK9WN6JQAA9RJhRA (envelope-from ) for ; Tue, 21 Feb 2023 23:50:47 +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 58BA337A13 for ; Tue, 21 Feb 2023 23:50:47 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUbT1-0006es-If; Tue, 21 Feb 2023 17:50:35 -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 1pUbSz-0006aD-Hd for guix-devel@gnu.org; Tue, 21 Feb 2023 17:50:33 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUbSm-0003d8-K2 for guix-devel@gnu.org; Tue, 21 Feb 2023 17:50:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version:content-transfer-encoding; bh=Ame4NszCSMxPhlzPEb4cM7aSFimcbgjMOn07U9tLlRo=; b=bMSrPVaP6hw0CtGu5x4bk9MAZgMhe8V3JB8I7Ai44YjqYFCw/XsAzerh dzty5EjnBNrYZpntMpKpmEHFSXqIA4bikdma4Uf7ZhpixAVdCEgeORhwm uBydBMMHSeG30uBoGpv4GtgWieGq9Npg3Yei/QNy3HsNH79IFii532Cex E=; X-IronPort-AV: E=Sophos;i="5.97,317,1669071600"; d="scan'208";a="48313058" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2023 23:50:17 +0100 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Konrad Hinsen Cc: Guix Devel Subject: Re: Using Guix inside a Guix container References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 3 =?utf-8?Q?Vent=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Violier X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 21 Feb 2023 23:50:16 +0100 In-Reply-To: (Konrad Hinsen's message of "Fri, 03 Feb 2023 17:52:22 +0100") Message-ID: <87pma2d45z.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.104; envelope-from=ludovic.courtes@inria.fr; helo=mail3-relais-sop.national.inria.fr 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677019847; a=rsa-sha256; cv=none; b=FMyuk10NqsB/Bv7PrLRHVCX0DZphFVQ+VGEVOJT0pHqsfA/Fx2D4G/55vdGGqunBpzJa8S 3JCjFTtYVSWS5wom3qWV8ogRAbrvJzvdrGs4X2pkhZVOgwPIp7I8Rba0BCmUIfJAgOnLxn mdpWUnaSmIyKXWPay/UWizb/Ltzle6v3JY5CMNdmk7f9fmhbhUQH7ZMtBqtsZCjn3Gm7He o6M/nhrkq1Sbd4NaxhENKuItljQdcc8D8lXU8GU/dMBQDyFMXwVRnabMfweqgLztsFGgJR QwwDhKFTFXmaVzDxMcpPOUSBWJNqvYyoZEqJ0u+g50eDQ3kFxTaj3g5DQs/pWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=bMSrPVaP; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=inria.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677019847; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=Ame4NszCSMxPhlzPEb4cM7aSFimcbgjMOn07U9tLlRo=; b=Wdbcu2OecU2BtKEiClEyikkISrWLeQI+UqUTpdqZ33kGKJbN1T7dQY+hfPRnxHpBQPvJkP cIIk9Nhd8/txp7LxYzFqaUCIMfJYB72Qnf71syG5VM0bVwIQa4H0a/ND0i9lT39PFhxiYo whckFomVRV51mNDS3WWWhDXvGvzZkE0PtAbPCCtAVkiM/Gs2HY0i1IKm+xdYM9Y9UbmMIL uYJLLZn4tjpneicLbohC99L5QErNYuL/1WJ6FNY+bazc7f8qaa5txBMkLCR1MPis/dbd21 b6uYvO9wcmTxHjT+l1Q5cqeBZ72YhBADdYdYwINfYpNX7KaKkuxp6TVcNKaMUg== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=bMSrPVaP; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=inria.fr X-Spam-Score: -7.43 X-Migadu-Queue-Id: 58BA337A13 X-Migadu-Spam-Score: -7.43 X-TUID: kXTQgZF1SmHm Hello! Konrad Hinsen skribis: > I have been playing with nested Guix containers recently, with some > suprising findings, and I am wondering if what I am doing is considered > officially supported or not. > > First: why? My use case is scientific workflows, for example using > snakemake. I want to run my workflows in Guix containers, for > reproducibility plus other reasons. But my workflows run other programs > in their tasks (basically just "shelling out"), and those tasks may use > their own Guix containers. That=E2=80=99s an interesting use case! I guess we have a hard-enough time getting the message through regarding the environment of tasks that we didn=E2=80=99t really consider the environment of the =E2=80=9Cdriver=E2=80= =9D. (Well, in a way, GWL and Guix-Jupyter sidestep the issue by integrating the mechanism to declare task environments.) > Superficially, this works fine if I add the "guix" package to my "outer" > container and expose the store plus the daemon's socket: > > guix shell -C guix \ > --expose=3D/var/guix/daemon-socket/socket \ > --expose=3D/gnu/store \ > -- \ > guix shell -C coreutils -- ls / I wasn=E2=80=99t sure =E2=80=98--expose=3D/gnu/store=E2=80=99 would even wo= rk=E2=80=A6 but it does! Kinda by chance though. The thing is that =E2=80=98-C=E2=80=99 bind-mounts just the subset of the s= tore that=E2=80=99s needed. To support nested containers, we need to bind-mount the whole store because new store items may pop up in there over time. I=E2=80=99d be inclined to add a new =E2=80=98-W=E2=80=99 (say) option to (= 1) share the whole store, and (2) share the daemon socket. That would be the documented way to create a container with support for nested containers. [...] > Great! Except that every time I run this command, it does the channel > update from scratch, so it's prohibitively slow. Sharing > ${HOME}/.cache/guix seems to fix that. So... finally... > > guix shell -C -N guix nss-certs \ > --expose=3D/var/guix/daemon-socket/socket \ > --expose=3D/gnu/store \ > --share=3D${HOME}/.cache/guix \ > -- \ > guix time-machine -C channels.scm \ > -- \ > shell -C coreutils \ > -- \ > ls / > > guix shell: error: mount: mount "none" on > "/tmp/guix-directory.vpOEDC/sys": Operation not permitted That one=E2=80=99s interesting. Reported here: https://issues.guix.gnu.org/61690 At least there=E2=80=99s a workaround: using =E2=80=98-CN=E2=80=99 in the n= ested container. Ludo=E2=80=99.