From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Hinsen Subject: Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter Date: Tue, 22 Oct 2019 13:12:47 +0200 Message-ID: References: <87lftt57ux.fsf@inria.fr> <87imowwt3i.fsf@gnu.org> <875zkru70u.fsf@inria.fr> <87imorqx0w.fsf@inria.fr> <87y2xd5bmb.fsf@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43296) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMs5t-0002Yw-Eh for guix-devel@gnu.org; Tue, 22 Oct 2019 07:12:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMs5r-0005ac-Oc for guix-devel@gnu.org; Tue, 22 Oct 2019 07:12:53 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:40151) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iMs5r-0005aD-DF for guix-devel@gnu.org; Tue, 22 Oct 2019 07:12:51 -0400 In-Reply-To: <87y2xd5bmb.fsf@inria.fr> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix Devel Hi Ludo, > Did you define an environment along the lines of the example at > ? No. I did look at this approach briefly, but it looks difficult at least, if not impossible. The situation I need to address is re-creating an environment from - a channel file (from "guix describe") - a manifest file (typically hand written) This should not require editing the manifest file, and it should work for any manifest file, even if it included package transformations or literal package definitions (yes, I do that, shame on me, I ought to set up my own channel instead). A manifest definition using only lookups by package name and version would be easy to translate into a manifest containing instances of inferior-package, but I don't see how to deal with the more exotic cases. I'd have to construct corresponding instances of inferior-package myself, which is perhaps possible, but not obvious. > Depending on the use case, another option is to not use inferiors at all > and simply do: > > guix pull --commit=3DXYZ -p ./my-old-guix > ./my-old-guix/bin/guix environment --ad-hoc whatevern > > But maybe I=E2=80=99m missing something, let me know. :-) That was my starting point. It's OK for manual execution, but if I want an Org-Mode file to this automatically, I need to generate a temporary file in place of ./my-old-guix with all the associated hassles: check that it doesn't exist before, and clean up in the end even in the case of errors. Maybe I'd even have to worry about two processes accessing the same temporary file and do some locking. Moreover, I may end up having a performance problem with "guix pull" being run again for every little script in my Org-Mode file. The big difference between Jupyter and Org-Mode is that Jupyter has only one kernel process per notebook, whereas Org-Mode by default has one process per code block. My dream would be to have something like guix environment -C channels.scm -m manifest.scm with reasonable caching of the pulled channels. That's in fact what I was trying to implement. Cheers, Konrad.