Skip to content

CUDA Image

CUDA Image #6

name: CUDA Image
on:
workflow_dispatch: null
push:
paths:
- Dockerfile
- environment.yml
- install.r
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
env:
BASE: 'quay.io/jupyter/pytorch-notebook:cuda12-ubuntu-24.04'
steps:
# For biggish images, github actions runs out of disk space.
# So we cleanup some unwanted things in the disk image, and reclaim that space for our docker use
# https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150
# and https://github.com/easimon/maximize-build-space/blob/b4d02c14493a9653fe7af06cc89ca5298071c66e/action.yml#L104
# This gives us a total of about 52G of free space, which should be enough for now
- name: cleanup disk space
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h
- uses: actions/checkout@v3
- name: Publish to GitHub Container Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: rocker-org/cuda
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
buildargs: BASE
registry: ghcr.io
- name: Publish to Docker Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: rocker/cuda
buildargs: BASE
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}