How to setup docker with NVIDIA GPU support on Ubuntu 22
This took a bit of a search for me, so here it is in case it’s useful:
Then you should be able to run the following docker container with gpu enabled:
And get the following output:
This took a bit of a search for me, so here it is in case it’s useful:
Then you should be able to run the following docker container with gpu enabled:
And get the following output:
Here is a script you can use to automatically cleanup AMIs older than 60 days (configurable), while keeping the 2 most recent AMIs in each region. This helps to remove outdated images, as well as reducing storage costs for your AMIs.
Particularly useful in the case of runs-on.com, where we regularly rebuild base images whenever GitHub releases a new version of the image runner.
The bin/cleanup
script (simply adjust the filters as needed):
Example output:
Example GitHub Action workflow file to schedule a cleanup every night:
Edit: RunsOn is now available as a modern way to setup self-hosted GitHub Actions runners!
While waiting for the RunsOn ephemeral self-hosted runners service, here is a short bash script, that can also be used as cloud-init script for launching GitHub hosted runners non-interactively:
You should be good to go!
Note that those runners won’t be ephemeral, so usual caveats apply regarding security of those runners.