[Repronim-trd3] Niceman installation behavior questions

Yaroslav Halchenko yoh at onerussian.com
Thu Feb 1 08:32:22 PST 2018


On Thu, 01 Feb 2018, Robert Buccigrossi wrote:
>   In working on installing a conda environment I have two questions (which
> I'll bring up in today's meeting, but wanted to give you a moment to
> ponder) :

> 1) *Temp directories for installation - *I need to download conda somewhere
> before I install it into its final location.  Conda itself uses
> tempfile.mkdtemp() to store its temporary downloads, but that doesn't work
> in the context of sessions. So I'm pondering "mktemp -d". Do we do
> something similar that I didn't find?

I think that "mktemp" would be a common operation for sessions, so
ideally we should provide a session method for that.  Also having a
method would allow us to centralize cleanup, e.g. upon session .close

On POSIX systems it could then be

mktemp -d -t niceman.XXXXXX

and for a local one to use tempfile.mkdtemp with similar params

> 2) *Placing environments* - Right now I'm looking at placing conda
> environments in the directory specified by the specs (sort of obvious).
> This works perfectly on dockers and other ephemeral environments, but may
> be destructive on a local shell.  So I was going to quit if the environment
> already existed.  Is that OK behavior?  

IMHO yes

> Could a future feature request be
> to provide an installation prefix for local shell installs?

I think we need

- in our specs to convert paths within home directories into relative to
  ~/

- finally come up with the specs manipulations helper (which will
  minimize them, remove versions/archs from specs, in utopian future be
  move packages between distributions, etc), one of the simple
  functions of which would be to rewrite paths -- pretty much a set of
  regex substitutions for paths.

and whenever 'instantiation' gets into the situation where a component
(conda or just some package/repository) is already there, it should just
retrace it within that environment and verify that it is the
"compatible" (Christian's part) with the desired specification.  If yes
-- just inform that it is already satisfied and proceed.  If not --
error.

-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        


More information about the Repronim-trd3 mailing list