Urgent.News

What's breaking now, across thousands of outlets.

Tech

Cache pip GitHub Actions installs, and Poetry, with numbers

To cache pip GitHub Actions installs you add cache: pip to actions/setup-python , and on a fast runner that is worth well under a second, because it caches downloads and not the install. The number that moves is elsewhere: a package with no wheel for your platform took 10.9 seconds to build against 0.5 seconds to install, and that build lands in the same cache. Measured on a latchkey-small runner…

Caching pip and Poetry installations in GitHub Actions can save significant time, but it depends on the specific dependencies being used. When caching with pip, it only caches the downloads and not the install, which can move the time saved from just under a second to a few seconds in the case of a package without a wheel for the runner's platform. The Poetry option, on the other hand, caches the virtualenv directories, restoring the finished virtualenv and saving tens of seconds.

The setup-python action in GitHub Actions defaults to finding a dependency file such as requirements.txt or pyproject.toml and caches the global cache directory, while Poetry caches the virtualenv directories for each project. This distinction is crucial when dependencies lack wheels for the runner's platform. The pip option allows for the network to be used again, while Poetry allows for the install to be reinstated.

The cache-dependency-path option allows for customization of the cache key, useful when dependency files reside in subdirectories. Measuring the caching effect, the download cache moved 0.8 seconds, while a package without a wheel took 10.4 seconds to build. Python dependency caching has a reputation it only half deserves, as the setup action's cache option primarily caches the download, while the actual installation time is usually the bottleneck.

The difference between pip and Poetry caching becomes evident when one of the dependencies has no wheel for the runner's platform, where pip has to compile it. This is where a cached directory stops saving time and starts saving tens of seconds. The Poetry path, which can restore the finished virtualenv, behaves differently from the pip path. The setup-python action defaults to caching the global cache directory, while Poetry caches virtualenv directories for each project.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to →

More in Tech

Our hospital chatbot cheated at its own exams — on purpose

When a hospital rolls out an HIS like InterSystems TrakCare, the knowledge lives in three places: classroom sessions, a Moodle full of training videos, and a pile of assessments everyone must pass.

  • Hospital chatbot trained on Moodle assessments
  • Bot completed 36 assessments to gather answers
  • System designed for Arabic-speaking hospitals

Supercharge AWS Emulator for AWS CDK Development with cdkd

TL;DR When you use AWS Emulator for development with AWS CDK, combining it with cdkd gives you the following benefits: cdkd automatically configures the connection to AWS Emulator, and environment…

  • cdkd simplifies AWS Emulator integration for CDK development.
  • cdkd configures AWS Emulator connection and resolves Lambda environment variables.
  • cdkd local runs app code locally while emulating or mocking AWS resources.

Docker COPY --from stage not found in CI

A docker COPY --from stage not found does not produce a message about stages, because BuildKit does not treat an unknown name as a mistake.

  • Docker COPY --from stage not found in CI, treated as image reference
  • BuildKit searches for unknown name in registry instead of treating as mistake
  • Numeric index provides explicit error, stage name causes silent registry trip

Running a dense 33B agent model on one 24 GB GPU: the offload trap and the empty reply

To self-host Nanbeige4.3-33B, the Apache-2.0 agent coding model the Nanbeige team (BOSS Zhipin) released on 24 October, two decisions matter most. First, which compressed copy of the weights you load for your card.

  • 33 billion-parameter dense model requires entire 20.8 GB file on GPU for each token
  • Partial offloading to CPU on 16 GB card slows model to 1.6 tokens per second
  • 3-bit file optimized to fit entirely on GPU, achieving 56.5 tokens per second

More from Sunday 15 November →