question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setup conda step takes too long

See original GitHub issue

Thank you for creating/maintaining this great Action!

It seems that setting up conda alone takes longer than usual. For example, take a look at this log, the “Set up conda” step. It takes 3 and a half minutes setting up conda (excluding the installation of dependencies). Is that expected or am I doing something wrong?

Thank you once again!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

7reactions
bollwyvlcommented, Dec 6, 2020

There are a lot more moving pieces coming up now than just use what’s on disk vs get an installer from a URL with a scheme we’ve been able to predict for half a decade, and the current code’s behavior w/r/t to mamba is hard to reason about.

I’ll wager, if you provide a mamba-version, it’s still going to try to install mamba from conda-forge, even if it’s already there, and still use conda for everything except the environment solve (e.g. conda config). These would defeat most gains of already having it on-disk, post-installer. Since such an installer with mamba didn’t exist until 13 hours ago, this wasn’t a problem… my thinking is we’ll likely need something like conda-exe: mamba if you know it’s already installed, as even if it is available, you might not want to use it, and tomorrow there may well be The Next Tool (lambada, tarantala) from The Next Installer.

Anyhow, I felt fixing some of these issues requires some pretty drastic restructuring… on #107 (which is becoming #108, #109, … pending review) I made a best effort attempt at getting us set up for The Next X, where X can be a one/two file PR. Hopefully we can get to where we can start adding features and addressing performance, but I fear not addressing the current technical debt first is going to make the situation worse.

3reactions
hadimcommented, Dec 6, 2020

I confirm the recently released MambaForge installer makes the CI faster:

- name: Setup conda
  uses: conda-incubator/setup-miniconda@v2
  with:
    installer-url: https://github.com/conda-forge/miniforge/releases/download/4.9.2-2/Mambaforge-Linux-x86_64.sh
    channel-priority: true
    use-only-tar-bz2: true
    activate-environment: my-env

- name: Anaconda Login
  run: |
    # Bypass the installation of anaconda-client
    TOKEN_DIR="$HOME/.config/binstar"
    TOKEN_PATH="$TOKEN_DIR/https%3A%2F%2Fapi.anaconda.org.token"
    mkdir -p $TOKEN_DIR
    echo -e "${ANACONDA_USER_TOKEN}\c" > $TOKEN_PATH

- name: Install Dependencies
  run: mamba env update -f env.yml

(the snippet also includes a way to login to anaconda without the need to install anaconda-client. Could be helpful for some here.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conda install taking too long - Stack Overflow
I wanted to downgrade Python to 3.7.4 , so I run the following command: (in the base env) conda install python=3.7.4 .
Read more >
Speed up your Conda installs with Mamba
Conda installs are very slow, but you can speed them with a much-faster Conda reimplementation called Mamba.
Read more >
Managing packages - Conda
Installing packages . Use the terminal or an Anaconda Prompt for the following steps. To install a specific package such as SciPy...
Read more >
Introduction to Conda for (Data) Scientists: Setup
Installation Instructions · Check to see if Conda is already installed · Old version of Anaconda? · Install Python 3 version of Miniconda...
Read more >
Tips & tricks — conda-forge 2022.12.21 documentation
How to fix it?¶ ... Newer conda versions (>=4.6) introduced a strict channel priority feature. Type conda config --describe channel_priority for more information....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found