nextstrain/docs.nextstrain.org

Add instructions for users who have already installed Conda

corneliusroemer opened this issue · 7 comments

In #124 you seem to have removed the snippets for how to set an Intel emulation environment.

Talking about this snippet:

.. warning::
If using a newer Mac with an `Apple silicon chip <https://support.apple.com/en-us/HT211814>`_ (e.g. M1), first run these commands to ensure Conda creates the environment with ``osx-64`` emulation:
.. code-block:: bash
# Create a new environment using Intel packages called base_osx-64
CONDA_SUBDIR=osx-64 conda create -n base_osx-64 python
# Activate new Intel-based environment
conda activate base_osx-64
# Ensure future Conda commands in this environment use Intel packages too.
conda config --env --set subdir osx-64

This is sad. I've already got the ARM miniconda installed. What do I do now?

I don't think everyone will want to uninstall conda just to install the Nextstrain environment.

We should definitely allow both options. If you set up fresh: it's easiest to use Intel miniconda.

If you've already got conda, this is how you enable Intel emulation environment.

@tsibley @victorlin

Actually, I just tried using the base_osx-64 environment and it didn't work.

What seems to work instead is to add the following after creation of the environment but before doing the installation:

conda config --env --set subdir osx-64

That's also much easier, just need to add another config variable - to the 4 we have already.

@corneliusroemer that's the current recommendation, it's just a bit more hidden now:

For those who really want to use the ``arm64`` Miniconda installer, it is still possible to set up the ``nextstrain`` Conda environment by configuring it to run with emulation. Run this after setting up the empty Conda environment and before the ``mamba install`` command:
.. code-block:: bash
conda config --env --set subdir osx-64
This will ensure that all commands in the active Conda environment are run using ``osx-64`` emulation, making it possible to install all the software required for Nextstrain to run.

@corneliusroemer: I've already got the ARM miniconda installed.

The main point of #124 is to recommend the average user to not do this. I'd assume the link in note is clear enough for power users like yourself:

image

Let me know how it could be more clear. Mainly I want to offload these alternative installation paths to the new FAQ page, to avoid confusion for the average user.

Hmm, but the point here is that the average user may already have installed conda

We need to give them an option, too.

That's why I think we need to at least explicitly mention where one can find information on what to do if one has conda installed already.

Am I missing something?

Also I noticed that the thing with base_osx-arm didn't work. I had to add the variable to the new environment, it didn't get inherited.

That's why I think we need to at least explicitly mention where one can find information on what to do if one has conda installed already.

I see, that's valid. The install docs haven't taken this scenario into account, so I think this is more of an enhancement New feature or request than bug Something isn't working .

Also I noticed that the thing with base_osx-arm didn't work. I had to add the variable to the new environment, it didn't get inherited.

Yeah, that's why I removed the suggestion of intermediate environment. The subdir=osx-64 config is only valid for conda commands run in the environment it's set in. In the old docs, this meant having it set on the intermediate environment would allow mamba create ... augur ... to install using osx-64. But once the new environment is activated, you would still need to set subdir=osx-64 there which we didn't include a recommendation for.