unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Konrad Hinsen <konrad.hinsen@fastmail.net>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter
Date: Tue, 22 Oct 2019 13:12:47 +0200	[thread overview]
Message-ID: <m1zhhtt4nk.fsf@fastmail.net> (raw)
In-Reply-To: <87y2xd5bmb.fsf@inria.fr>

Hi Ludo,

> Did you define an environment along the lines of the example at
> <https://guix.gnu.org/manual/devel/en/html_node/Inferiors.html>?

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=XYZ -p ./my-old-guix
>   ./my-old-guix/bin/guix environment --ad-hoc whatevern
>
> But maybe I’m 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.

  reply	other threads:[~2019-10-22 11:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  8:21 Towards reproducibly Jupyter notebooks with Guix-Jupyter Ludovic Courtès
2019-10-10  8:59 ` zimoun
2019-10-10 10:07   ` Ludovic Courtès
2019-10-10 11:02   ` Konrad Hinsen
2019-10-10 14:52     ` Ludovic Courtès
2019-10-14  6:35       ` Konrad Hinsen
2019-10-14  7:21         ` Ludovic Courtès
2019-10-14 11:45           ` Konrad Hinsen
2019-10-14 13:25             ` Ludovic Courtès
2019-10-21 12:50               ` Konrad Hinsen
2019-10-22 10:16                 ` Ludovic Courtès
2019-10-22 11:12                   ` Konrad Hinsen [this message]
2019-10-24 10:26                     ` Ludovic Courtès
2019-10-25  9:21                       ` Konrad Hinsen
2019-10-29 14:16                         ` Konrad Hinsen
2019-10-29 15:00                           ` Pierre Neidhardt
2020-02-27 14:25                             ` Pjotr Prins
2020-02-27 14:36                               ` zimoun
2020-02-27 18:11                                 ` Pjotr Prins
2020-02-27 18:20                                   ` zimoun
2020-02-27 18:43                                     ` Vincent Legoll
2020-02-27 18:49                                       ` zimoun
2020-02-27 19:38                                         ` Ricardo Wurmus
2020-02-27 19:48                                           ` zimoun
2019-10-23  9:53                   ` Konrad Hinsen
2019-10-23 10:32                     ` zimoun
2019-10-23 12:15                       ` Konrad Hinsen
2019-10-23 16:49                         ` zimoun
2019-10-24  6:20                           ` Konrad Hinsen
2019-10-24 13:23                             ` Pierre Neidhardt
2019-10-25 14:29                               ` Konrad Hinsen
2019-10-25 14:40                                 ` Pierre Neidhardt
2019-10-10 10:19 ` Roel Janssen
2019-10-10 11:59   ` Ludovic Courtès
2019-10-10 14:57   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1zhhtt4nk.fsf@fastmail.net \
    --to=konrad.hinsen@fastmail.net \
    --cc=guix-devel@gnu.org \
    --cc=ludovic.courtes@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).