Skip to content

docer

docer #252

name: Build Base Image
on:
push:
branches:
- main
- grpc
env:
CUDA_BASE_REPO: cuda-go-python-base
jobs:
build-base-image:
if: startsWith(github.event.commits[0].message, 'build_base')
strategy:
matrix:
cuda: [11.7,12.1]
python: [ 3.9.13 ,3.11.7]
golang: ["1.20"]
ubuntu_os: [1804]
runs-on: self-hosted
# 项目构建
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
# github-server-url: https://521github.com
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.IFLYOPENSOURCE }}
password: ${{ secrets.DOCKER_SECRET }}
- name: Log in to Artifacts Hub
uses: docker/login-action@v2
with:
registry: artifacts.iflytek.com/docker-private
username: ${{ secrets.YBYANG7_ARTIFACTS }}
password: ${{ secrets.YBYANG7_ARTIFACTS_PASS }}
- name: Py39 Build Docker Image -cuda-base
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/gpu/base/python${{ matrix.python }}/cuda-${{ matrix.cuda }}/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: false
tags: |
docker.io/${{ secrets.IFLYOPENSOURCE }}/${{env.CUDA_BASE_REPO}}:${{ matrix.cuda }}-${{ matrix.golang }}-${{ matrix.python }}-ubuntu${{ matrix.ubuntu_os }}
artifacts.iflytek.com/docker-private/atp/${{env.CUDA_BASE_REPO}}:${{ matrix.cuda }}-${{ matrix.golang }}-${{ matrix.python }}-ubuntu${{ matrix.ubuntu_os }}
- name: push
run: |
docker push docker.io/${{ secrets.IFLYOPENSOURCE }}/${{env.CUDA_BASE_REPO}}:${{ matrix.cuda }}-${{ matrix.golang }}-${{ matrix.python }}-ubuntu${{ matrix.ubuntu_os }}
docker push artifacts.iflytek.com/docker-private/atp/${{env.CUDA_BASE_REPO}}:${{ matrix.cuda }}-${{ matrix.golang }}-${{ matrix.python }}-ubuntu${{ matrix.ubuntu_os }}