Skip to content

Build docker images for x64 #635

Build docker images for x64

Build docker images for x64 #635

Workflow file for this run

name: Build docker images for x64
on:
push:
branches:
- master
schedule:
- cron: "40 13 * * *"
workflow_dispatch:
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
target:
[
"cuda11.8-torch",
"cuda12.1-torch",
"cuda12.4-torch",
"cuda12.6-torch",
"yt-dlp",
"lux",
"imagemagick",
"debugger",
"pdftotext",
"basic-auth-nginx",
"squid",
"stress",
"gallery-dl",
]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
if: contains(fromJson('["alma-7b-server", "iopaint", "llama-cpp-python"]'), matrix.target)
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.target }}
ghcr.io/${{ github.actor }}/${{ matrix.target }}
tags: |
type=schedule,pattern={{date 'YYYYMMDD'}}
type=raw,value=latest
- name: Build and push Docker images
uses: docker/build-push-action@v5
# continue-on-error: true
with:
context: ./${{ matrix.target }}
platforms: linux/amd64
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}