forked from bitsandbytes-foundation/bitsandbytes
-
Notifications
You must be signed in to change notification settings - Fork 10
33 lines (30 loc) · 1.11 KB
/
base-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Base Docker images for building
on:
push:
paths: [ 'docker/*', '.github/workflows/base-images.yml' ]
pull_request:
branches: [ main ]
paths: [ 'docker/*', '.github/workflows/base-images.yml' ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
cuda-linux:
strategy:
matrix:
cuda_version: ["12", "11"]
runs-on: ubuntu-latest
steps:
# Check out code
- uses: actions/checkout@v4
# Set up build
- name: Set up Docker multiarch
uses: docker/setup-qemu-action@v2
- name: Log in to ghcr.io
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# Build Docker image
- name: Build Docker image
run: |
set -ex
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg repo_name=${{ github.repository }} -t ghcr.io/${{ github.repository }}/cuda-linux:${{ matrix.cuda_version }} -f docker/cuda${{ matrix.cuda_version }}-linux.Dockerfile docker