Skip to content

mlops: add python3.11 based image #58

mlops: add python3.11 based image

mlops: add python3.11 based image #58

Workflow file for this run

name: Build jupyterlab-mlops Image
env:
KEDRO_DEFAULT_VERSION: "NONE"
MLFLOW_DEFAULT_VERSION: "2.15.1"
VSCODE_DEFAULT_VERSION: "NONE"
PYTHON_DEFAULT_VERSION: "3.11"
NB_DEFAULT_UID: "1000"
NB_DEFAULT_GID: "100"
NB_DEFAULT_USER: "jupyter"
on:
pull_request:
paths:
- 'jupyterlab-mlops/**'
- '.github/workflows/build_mlops.yml'
push:
tags:
- 'jupyterlab-mlops-*.*.*'
jobs:
buildx-mlops:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- base-image: "jupyter/pyspark-notebook:lab-3.2.1"
spark-support: true
kedro-version: 0.17.5
mlflow-version: 1.23.1
vscode-version: 4.0.2
python-version: 3.8
tag-base: dev
nb-user: jovyan
- base-image: "jupyter/pyspark-notebook:lab-3.2.1"
spark-support: true
kedro-version: 0.17.5
mlflow-version: 1.23.1
vscode-version: 4.0.2
python-version: 3.8
tag-base: azure
nb-user: azureuser
nb-uid: "1001"
nb-gid: "1004"
- base-image: "gcr.io/deeplearning-platform-release/base-cpu:m92"
spark-support: false
kedro-version: 0.17.5
mlflow-version: 1.23.1
vscode-version: 4.0.2
python-version: 3.8
tag-base: vertex
nb-user: jupyter
- base-image: "jupyter/minimal-notebook:python-3.11.6"
spark-support: false
mlflow-version: 2.15.1
vscode-version: 4.91.1
python-version: 3.11
tag-base: python-3.11
nb-user: jovyan
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
id: buildx-mlops
with:
install: true
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx
- name: Login to GCR
uses: docker/login-action@v1
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.PUBLIC_GCR_DEPLOY_SA_KEY }}
- name: Extract tag
if: github.event_name == 'push'
id: tag-info
run: |
TAG_NAME=${GITHUB_REF#refs/*/}
IMAGE_VERSION=`echo $TAG_NAME | sed -e's/\(.*\)-\([[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\)\+/\2/'`
echo "::set-output name=IMAGE_VERSION::$IMAGE_VERSION"
- name: Build jupyterlab-mlops
uses: docker/build-push-action@v3
with:
context: jupyterlab-mlops
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: gcr.io/getindata-images-public/jupyterlab-mlops:${{ matrix.tag-base }}-${{ github.sha }},gcr.io/getindata-images-public/jupyterlab-mlops:${{ matrix.tag-base }}-${{ steps.tag-info.outputs.IMAGE_VERSION || 'latest' }},gcr.io/getindata-images-public/jupyterlab-mlops:${{ matrix.tag-base }}-latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
build-args: |
BASE_IMAGE=${{ matrix.base-image }}
SPARK_SUPPORT=${{ matrix.spark-support }}
KEDRO_VERSION=${{ matrix.kedro-version || env.KEDRO_DEFAULT_VERSION }}
MLFLOW_VERSION=${{ matrix.mlflow-version || env.MLFLOW_DEFAULT_VERSION }}
VSCODE_VERSION=${{ matrix.vscode-version || env.VSCODE_DEFAULT_VERSION }}
PYTHON_VERSION=${{ matrix.python-version || env.PYTHON_DEFAULT_VERSION }}
USER=${{ matrix.nb-user || env.NB_DEFAULT_USER }}
UID=${{ matrix.nb-uid || env.NB_DEFAULT_UID }}
GID=${{ matrix.nb-gid || env.NB_DEFAULT_GID }}
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache