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.

Setting up conda env takes 2-8min per CI job — cache it?

See original GitHub issue

Looking at a recent CI run on main, I see the Setup Conda Environment step taking 2-3min on linux, and typically 6-7min on Windows and macOS. That’s 10-15% of total job runtime.

Could we cache the conda environment between CI runs, and only reinstall when the environment.yaml changes? (And maybe once per day too, so things don’t get too stale?)

A downside is that most of our CI dependencies are un-pinned, which we’re relying on as a crude form of upstream testing: when dependencies release new versions, our CI might non-deterministically go red if they broke something. Personally, I think this is a bad experience for contributors and bad practice for CI in general, but it doesn’t seem like we’re going to change this right now https://github.com/dask/community/issues/203. So if we did cache conda envs, it might add more latency when upstream dependencies break us.

cc @fjetter @quasiben

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
charlesblucacommented, Aug 8, 2022

Yeah I can look into this

1reaction
charlesblucacommented, Aug 10, 2022

Could we have a nightly job that installs the env, runs the tests and only caches it when everything passes?

Think this would already be happening if we merge in #6855, as testing CI is also running on a schedule, and thus a cached environment would be created (if it doesn’t already exist) at UTC 6:00 and 18:00:

https://github.com/dask/distributed/blob/f43bc4729f52b3fbfc0758506adfcf51276ffb60/.github/workflows/tests.yaml#L7

I’m not sure if these times were set with Dask maintainers’ local timezones in mind, but it would be nice to switch the scheduled CI to run at UTC 00:00 and 12:00, so that new cached environments start getting built right when the old cached envs become stale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reduce your build times on GitHub Actions by caching ...
On the other hand, the documentation of the setup-miniconda action describes a way to cache the downloaded packages, but currently that ...
Read more >
Understanding and Improving Conda's performance - Anaconda
For example, consider creating a simple environment without a cached index: conda clean -iy && CONDA_INSTRUMENTATION_ENABLED=1 conda create ...
Read more >
Reuse a conda environment within the same gitlab CI pipeline?
The first thing I need to do is to set the CONDA_ENVS_PATH to somewhere in my project directory. I've looked at gitlab's caching...
Read more >
GitLab CI and conda
Build time: 2 minutes 55 seconds. Nice but we need some cache to avoid downloading all the packages everytime. The first problem is...
Read more >
Untitled
99 beats per min, Linhope spout address. Volerany grallers, Frauenarztpraxis oberlinden, Seabra supermarket fall river ma, Aramaic alphabet pdf?
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