Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

One python version per container #22

Merged
merged 36 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
82b7cee
make python version part of container build
divyegala May 24, 2023
856025d
correct default
divyegala May 24, 2023
0e10e7b
trying to refactor to follow mambaforge-cuda repo
divyegala May 24, 2023
1b72c21
get args from action
divyegala May 24, 2023
d7353ef
remove image repo step
divyegala May 24, 2023
9c852d5
define image repo in build-image.yml
divyegala May 24, 2023
b73bc23
fix py ver
divyegala May 24, 2023
17959c3
add missing $ sign
divyegala May 24, 2023
4730517
set CPU_ARCH as build arg
divyegala May 24, 2023
36bc2b5
remove comments
divyegala May 25, 2023
fe70ee1
address review comments
divyegala May 25, 2023
c1fb938
add empty line at EOF
divyegala May 25, 2023
d521c30
combine build dockerfile
divyegala May 25, 2023
3aea866
correct typo
divyegala May 25, 2023
c6c3315
fix another typo
divyegala May 25, 2023
3a8cdd5
fix switch case
divyegala May 25, 2023
9568250
set real arch
divyegala May 25, 2023
3402452
ubuntu20 only arm images
divyegala May 25, 2023
d56b1ae
add ubuntu20.04 to citestwheel, update README, and delete unused file…
divyegala May 25, 2023
e433ea0
temporarily try to build images from pr
divyegala May 26, 2023
a3d4c66
fix IMAGE_REPO access
divyegala May 26, 2023
a0fed82
Revert "temporarily try to build images from pr"
divyegala May 26, 2023
bac7615
remove 'base' from tags
divyegala May 26, 2023
d140d29
make sure RAPIDS_CUDA_VERSION is available in the env
divyegala May 26, 2023
efa01ee
Revert "Revert "temporarily try to build images from pr""
divyegala May 26, 2023
d8710be
pass manylinux arg
divyegala May 26, 2023
e0af63e
Apply suggestions from code review
divyegala May 30, 2023
735cbb5
simplify citestwheel
divyegala May 31, 2023
98ca103
add awscli in citestwheel
divyegala Jun 1, 2023
7b32bce
pip install awscli
divyegala Jun 1, 2023
d7a2b7f
Merge branch 'main' into one-python-ver-per-container
ajschmidt8 Jun 1, 2023
b3ed16b
Merge remote-tracking branch 'upstream/main' into one-python-ver-per-…
divyegala Jun 1, 2023
f355bee
stop pushing images
divyegala Jun 1, 2023
058eb0d
Merge branch 'one-python-ver-per-container' of https://github.com/div…
divyegala Jun 1, 2023
b033dc9
rename merge to push for better diff
divyegala Jun 1, 2023
bdbe81a
Update .github/workflows/push.yml
divyegala Jun 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/workflows-disabled/build-115.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows-disabled/build-l4t.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows-disabled/prs.yml

This file was deleted.

103 changes: 103 additions & 0 deletions .github/workflows/build-and-publish-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: build and publish imgs workflow

on:
workflow_call:
inputs:
build_type:
required: true
type: string

defaults:
run:
shell: bash

jobs:
compute-matrix:
runs-on: ubuntu-latest
outputs:
MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Compute matrix
id: compute-matrix
run: |
MATRIX=$(ci/compute-mx.sh)
echo "MATRIX=${MATRIX}" | tee -a ${GITHUB_OUTPUT}
docker:
needs: compute-matrix
strategy:
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
fail-fast: false
secrets: inherit
uses: ./.github/workflows/build-image.yml
with:
ARCHES: ${{ toJSON(matrix.ARCHES) }}
CUDA_VER: ${{ matrix.CUDA_VER }}
LINUX_VER: ${{ matrix.LINUX_VER }}
PYTHON_VER: ${{ matrix.PYTHON_VER }}
IMAGE_REPO: ${{ matrix.IMAGE_REPO }}
TAG: rapidsai/${{ matrix.IMAGE_REPO }}:cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PYTHON_VER }}
BUILD_TYPE: ${{ inputs.build_type }}
build-multiarch-manifest:
# if: inputs.build_type == 'branch'
divyegala marked this conversation as resolved.
Show resolved Hide resolved
needs: [docker, compute-matrix]
strategy:
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER }}
password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN }}
- name: Create multiarch manifest
run: |
LATEST_CUDA_VER=$(yq '.CUDA_VER | sort | .[-1]' axis.yaml)
LATEST_PYTHON_VER=$(yq -o json '.PYTHON_VER' axis.yaml | jq -r 'max_by(split(".") | map(tonumber))')
LATEST_UBUNTU_VER=$(yq '.LINUX_VER | map(select(. == "*ubuntu*")) | sort | .[-1]' axis.yaml)

source_tags=()
tag="rapidsai/${{ matrix.IMAGE_REPO }}:cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PYTHON_VER }}"
for arch in $(echo '${{ toJSON(matrix.ARCHES) }}' | jq .[] -r); do
source_tags+=("${tag}-${arch}")
done

docker manifest create ${tag} ${source_tags[@]}
docker manifest push ${tag}
if [[
"${LATEST_UBUNTU_VER}" == "${{ matrix.LINUX_VER }}" &&
"${LATEST_CUDA_VER}" == "${{ matrix.CUDA_VER }}" &&
"${LATEST_PYTHON_VER}" == "${{ matrix.PYTHON_VER }}"
]]; then
docker manifest create rapidsai/${{ matrix.IMAGE_REPO }}:latest ${source_tags[@]}
docker manifest push rapidsai/${{ matrix.IMAGE_REPO }}:latest
fi
delete-temp-images:
# if: inputs.build_type == 'branch'
divyegala marked this conversation as resolved.
Show resolved Hide resolved
needs: [compute-matrix, build-multiarch-manifest]
strategy:
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
runs-on: ubuntu-latest
steps:
- name: Remove temporary images
run: |
HUB_TOKEN=$(
curl -s -H "Content-Type: application/json" \
-X POST \
-d "{\"username\": \"${{ secrets.GPUCIBOT_DOCKERHUB_USER }}\", \"password\": \"${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN }}\"}" \
https://hub.docker.com/v2/users/login/ | jq -r .token \
)

org="rapidsai"
repo="${{ matrix.IMAGE_REPO }}"
tag="cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PYTHON_VER }}"

for arch in $(echo '${{ toJSON(matrix.ARCHES) }}' | jq .[] -r); do
curl -i -X DELETE \
-H "Accept: application/json" \
-H "Authorization: JWT $HUB_TOKEN" \
"https://hub.docker.com/v2/repositories/$org/$repo/tags/$tag-$arch/"
done
81 changes: 81 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Build and push image variant

on:
workflow_call:
inputs:
ARCHES:
required: true
type: string
CUDA_VER:
required: true
type: string
LINUX_VER:
required: true
type: string
PYTHON_VER:
required: true
type: string
IMAGE_REPO:
required: true
type: string
TAG:
required: true
type: string
BUILD_TYPE:
required: true
type: string

jobs:
docker-build:
strategy:
matrix:
ARCH: ${{ fromJSON(inputs.ARCHES) }}
CUDA_VER: ["${{ inputs.CUDA_VER }}"]
LINUX_VER: ["${{ inputs.LINUX_VER }}"]
PYTHON_VER: ["${{ inputs.PYTHON_VER }}"]
fail-fast: false
runs-on: "linux-${{ matrix.ARCH }}-cpu4"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER }}
password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN }}
- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: docker
endpoint: builders
- name: Get Real Arch and Manylinux Version
id: get-real-arch
run: |
REAL_ARCH=$(arch)
echo "REAL_ARCH=${REAL_ARCH}" >> $GITHUB_OUTPUT
if [[ "${{ inputs.LINUX_VER }}" == "ubuntu20.04" || "${{ inputs.LINUX_VER }}" == "ubuntu18.04" ]]; then
echo "MANYLINUX_VER=manylinux_2_31" >> $GITHUB_OUTPUT
else
echo "MANYLINUX_VER=manylinux_2_17" >> $GITHUB_OUTPUT
fi
- name: Build image
if:
uses: docker/build-push-action@v4
with:
context: ./${{ inputs.IMAGE_REPO }}
file: ./${{ inputs.IMAGE_REPO }}/Dockerfile
# push: ${{ inputs.BUILD_TYPE == 'branch' }}
push: true
divyegala marked this conversation as resolved.
Show resolved Hide resolved
pull: true
build-args: |
CUDA_VER=${{ inputs.CUDA_VER }}
LINUX_VER=${{ inputs.LINUX_VER }}
PYTHON_VER=${{ inputs.PYTHON_VER }}
CPU_ARCH=${{ matrix.ARCH }}
REAL_ARCH=${{ steps.get-real-arch.outputs.REAL_ARCH }}
MANYLINUX_VER=${{ steps.get-real-arch.outputs.MANYLINUX_VER }}
tags: ${{ inputs.TAG }}-${{ matrix.ARCH }}
Loading