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

DOC: Add miniconda install scripts to macOS (and maybe Windows) docs #121

Open
corneliusroemer opened this issue Jul 25, 2022 · 7 comments
Assignees

Comments

@corneliusroemer
Copy link
Member

Let's add short scripts for installing Miniconda on macOS (and if possible Windows) as we do for Linux

As for a short script to download and run Miniconda, we provide a multi-command example of doing this for Linux (incl. WSL), but not for macOS or Windows:

image

Not sure why the difference, but possibly because we're suggesting the graphical installers for macOS and Windows. In any case, addressing that is a separate PR in my mind and not one I'm going to do right now.

Originally posted by @tsibley in #120 (comment)

@j23414
Copy link
Contributor

j23414 commented Jul 26, 2022

There are mainly two installer scripts for Mac (Intel 86 vs Apple M1 chip) listed and linked in this miniconda table.

For Mac Intel 86 it can look like:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh
# follow through installation prompts
rm Miniconda3-latest-MacOSX-x86_64.sh

While for Mac Apple M1 chip it can look like:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh
bash Miniconda3-latest-MacOSX-arm64.sh
# follow through installation prompts
rm Miniconda3-latest-MacOSX-arm64.sh

@corneliusroemer would documenting both on the MacOS be acceptable? Or do you have a sense that most people have moved to the M1 chip on Mac?

The Window's installer scripts mainly pull exe files

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86.exe

@j23414
Copy link
Contributor

j23414 commented Jul 26, 2022

We could also make it more general but complicated to read ;)

# Pick one OS and ARCH pair
OS=Windows
ARCH=x86_64.exe
ARCH=x86.exe

OS=MacOSX
ARCH=x86_64.sh
ARCH=arm64.sh

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-${OS}-${ARCH}

@tsibley
Copy link
Member

tsibley commented Jul 26, 2022

would documenting both on the MacOS be acceptable? Or do you have a sense that most people have moved to the M1 chip on Mac?

My 2¢ is we'd want to document both. The M1 Macs are still probably at least a couple years from being ubiquitous enough to drop Intel Mac instructions.

@corneliusroemer
Copy link
Member Author

Also possible: we could make it autodetect mac architecture

https://stackoverflow.com/questions/65259300/detect-apple-silicon-from-command-line

We should offer both - as long as there's >10% usage of Intel out there. And Macs last quite long so it'll be some time.

@victorlin
Copy link
Member

victorlin commented Jul 27, 2022

My opinion is to suggest Intel install for all Macs, with a note that non-emulated M1 install is also an option but be aware of the limitations. With the current state of things, installing M1 for the average bioinformatics researcher will likely cause environment headaches since you'd need to emulate many popular packages anyways. For example, our current steps create the nextstrain environment under emulation which is comparable to creating it with Intel-installed miniconda. More: #109 (comment)

@corneliusroemer
Copy link
Member Author

corneliusroemer commented Aug 4, 2022

I'm just installing things fresh on my new M1 Pro - so will document the journey and what I notice here:

  1. We may want to recommend installing mambaforge for those who don't have conda yet - it comes preconfigured for conda-forge and with mamba preinstalled. Sensible defaults.
    This is a general point that we could use for all installations.
    Mac specific: It's installable via brew (many will have brew): brew install --cask mambaforge
    Alternatively: script is available here for all platforms https://github.com/conda-forge/miniforge#unix-like-platforms

  2. I would appreciate a quick explanation why it's necessary to create an ox64 base environment and use that. Is that still applicable? Would be nice to have a quick link to the issue where we discussed this for the interested reader. Because I'd expect conda to be able to deal with the right channels automatically.
    Specifically I mean this part

If using a newer Mac with an Apple silicon chip (e.g. M1), first run these commands to ensure Conda creates the environment with osx-64 emulation:

# 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

@victorlin
Copy link
Member

@corneliusroemer: I would appreciate a quick explanation why it's necessary to create an ox64 base environment and use that. Is that still applicable?

See #124 for the newer suggestion and detailed reasoning in a new FAQ page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Prioritized
Development

No branches or pull requests

4 participants