Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda: init at miniconda 4.3.11 #26443

Closed
wants to merge 1 commit into from
Closed

conda: init at miniconda 4.3.11 #26443

wants to merge 1 commit into from

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Jun 7, 2017

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@FRidh
Copy link
Member Author

FRidh commented Jun 7, 2017

Shameless copy from #26245. Thanks @jluttine !
cc @layus

@FRidh
Copy link
Member Author

FRidh commented Jun 7, 2017

To do:

  • rename to miniconda?
  • miniconda3 (3.6) and miniconda (2.7). Perhaps also anaconda?
  • darwin, though out of scope for this PR
  • fix meta
  • some option to specify packages and/or env variables. We could make it easier overridable.

@layus
Copy link
Member

layus commented Jun 7, 2017

Works for me :-).

Strange enough, trying to run anaconda-navigator fails unless I set USER env var. Could we add this one to the environment ?

@jluttine
Copy link
Member

jluttine commented Jun 7, 2017

I'm not sure what exactly is meant by the suggestion "rename to miniconda" so I thought I'd give my comment: It's possible to add different installers for Miniconda vs Anaconda and Python 2 vs 3. So one could replace conda-install with four different installers miniconda-install, miniconda3-install, anaconda-install and anaconda3-install if wanted. The current conda-install is Python 3 miniconda installer. But in other places I would keep the term conda instead of renaming to miniconda because Miniconda is just a minimal installer for Conda and its dependencies. That is, I would keep the default path ~/.conda, the command load-conda-shell and the package name conda as such.

@FRidh
Copy link
Member Author

FRidh commented Jun 7, 2017

@layus

Strange enough, trying to run anaconda-navigator fails unless I set USER env var. Could we add this one to the environment ?

Maybe we can just passthru the current environment somehow? I suppose this issue didn't exist when using nix-shell.

@jluttine what I mean is to indeed add all installers. However, there would be a separate derivation for each and so we keep the name conda-install for each of them.

That is, I would keep the default path ~/.conda, the command load-conda-shell and the package name conda as such.

Definitely


# Add any other packages here, for instance:
emacs
git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps emacs and git should be removed? They were just my personal requirements, not relevant for conda itself.

@jluttine
Copy link
Member

jluttine commented Jun 7, 2017

@FRidh I'm not too familiar with the "derivation" term. So how would the users use the different installers?

Something like this:

nix-env -iA miniconda3
load-conda-shell
conda-install

or

nix-env -iA conda
load-miniconda3-shell
conda-install

or

nix-env -iA conda
load-conda-shell
miniconda3-install

or something else? I mean, at what point and how users choose the installer?

@FRidh
Copy link
Member Author

FRidh commented Jun 7, 2017

@jluttine

nix-env -iA conda.miniconda3
load-conda-shell
conda-install

@jluttine
Copy link
Member

jluttine commented Jun 7, 2017

Ok. Indeed, adding all installers inside the same conda shell derivation would cause downloading all the installers to nix store even if only one of them is used inside the conda shell. However, this could be avoided if instead of downloading the miniconda/anaconda installers to store, we would just add simple scripts (e.g., miniconda3-install) which fetch the correct installer from the Continuum repo only when called.

So, for instance, miniconda3-install would look something like:

wget https://repo.continuum.io/miniconda/Miniconda3-${version}-Linux-x86_64.sh -O /tmp/miniconda.sh
chmod +x /tmp/miniconda.sh
bash /tmp/miniconda.sh -b -p ${installationPath}

And similarly for miniconda-install, anaconda-install and anaconda3-install. Then we could have all the installers inside one derivation conda and the user can use whichever (s)he prefers without the overhead of having multiple big Anaconda installers in nix store. But is this approach bad in some other way?

EDIT: sha256 hash checking could be added after wget.

@layus
Copy link
Member

layus commented Jun 7, 2017

@layus

Strange enough, trying to run anaconda-navigator fails unless I set USER env var. Could we add this one to the environment ?

Maybe we can just passthru the current environment somehow? I suppose this issue didn't exist when using nix-shell.

Well, I have no idea, I didn't use nix-shell. But it's not really important for the release.

@martingms
Copy link
Contributor

Is there any hope of getting this merged any time soon?

@aborsu
Copy link
Contributor

aborsu commented Dec 21, 2017

Hello,
Is there anything happening here?

@bhipple bhipple mentioned this pull request Feb 12, 2018
8 tasks
@FRidh
Copy link
Member Author

FRidh commented Feb 12, 2018

Closing in favor of #34872.

@FRidh FRidh closed this Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants