From 61d7734fe982f260e59d5aac45bcaadde0343e1e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 25 Oct 2024 15:10:50 -0600 Subject: [PATCH 1/3] Always install and upgrade pip and setuptools on WAML image --- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 9cc5faec..19ec889f 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -103,8 +103,10 @@ RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyt ### Install basic data science packages for Python and R ### COPY deps/* / -RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -r /tmp/py_packages.txt \ +RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -U pip setuptools \ + && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -r /tmp/py_packages.txt \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install -U pip setuptools \ && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install -r /tmp/py_packages.txt \ && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip cache purge \ && rm /tmp/py_packages.txt From 44a7d4e0ea21947deb9fa351f40403438fc2042a Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 28 Oct 2024 09:51:23 -0600 Subject: [PATCH 2/3] Switch from `azure` to `azure-sdk` package Downgrade Python 3.12 to 3.11 for AML --- docker-bake.hcl | 3 ++- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 4 ++-- workbench-for-microsoft-azure-ml/deps/py_packages.txt | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 6e5e9bc5..090a157e 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -96,6 +96,7 @@ function get_tags { variable BASE_BUILD_MATRIX { default = { builds = [ + {os = "ubuntu2204", r_primary = "4.4.1", r_alternate = "4.3.3", py_primary = "3.11.10", py_alternate = "3.10.15"}, {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, {os = "ubuntu2204", r_primary = "4.4.1", r_alternate = "4.3.3", py_primary = "3.12.6", py_alternate = "3.11.10"}, ] @@ -191,7 +192,7 @@ variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX { variable WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.4.1", r_alternate = "4.3.3", py_primary = "3.12.6", py_alternate = "3.11.10"}, + {os = "ubuntu2204", r_primary = "4.4.1", r_alternate = "4.3.3", py_primary = "3.11.10", py_alternate = "3.10.15"}, ] } } diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 19ec889f..bb6fd765 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -103,10 +103,10 @@ RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyt ### Install basic data science packages for Python and R ### COPY deps/* / -RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -U pip setuptools \ +RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -U pip setuptools wheel \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -r /tmp/py_packages.txt \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install -U pip setuptools \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install -U pip setuptools wheel \ && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install -r /tmp/py_packages.txt \ && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip cache purge \ && rm /tmp/py_packages.txt diff --git a/workbench-for-microsoft-azure-ml/deps/py_packages.txt b/workbench-for-microsoft-azure-ml/deps/py_packages.txt index 14a2b945..8df3ab80 100644 --- a/workbench-for-microsoft-azure-ml/deps/py_packages.txt +++ b/workbench-for-microsoft-azure-ml/deps/py_packages.txt @@ -1,4 +1,4 @@ -azureml +azureml-sdk azureml-core azureml-dataset-runtime azure-ai-ml From 803089269f42f515ef18b35428b8cf696b8ad6da Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 28 Oct 2024 14:53:23 -0600 Subject: [PATCH 3/3] Revert "Disable Azure ML image build for now" This reverts commit ea37e1d1d22c0dfc9fcd4fd94681321f39fe849d. --- .github/workflows/build-bake.yaml | 43 +++++++++++++++++++++++++++- .github/workflows/build-manual.yaml | 6 ++-- .github/workflows/update-readme.yaml | 1 + 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml index be7b55e7..c1c67e11 100644 --- a/.github/workflows/build-bake.yaml +++ b/.github/workflows/build-bake.yaml @@ -6,7 +6,7 @@ on: - main - dev pull_request: - + name: Release - Build, Test, and Push jobs: setup: @@ -374,3 +374,44 @@ jobs: snyk-org: ${{ secrets.SNYK_ORG }} snyk-token: '${{ secrets.SNYK_TOKEN }}' + workbench-for-microsoft-azure-ml: + needs: [setup] + name: Workbench for Microsoft Azure ML + runs-on: ubuntu-latest-8x + + concurrency: + group: bake-waml-${{ github.ref }} + cancel-in-progress: true + + env: + target: workbench-for-microsoft-azure-ml + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} + + steps: + - name: Checkout + if: github.event_name == 'schedule' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event_name != 'schedule' + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + id: setup-buildx + with: + buildkitd-config: ./share/buildkitd.toml + + - name: Build, Test, and Push + uses: ./.github/actions/bake-test-push + with: + target: ${{ env.target }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event_name == 'schedule' }} + ghcr-token: ${{ secrets.GITHUB_TOKEN }} + dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} + dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' + snyk-org: ${{ secrets.SNYK_ORG }} + snyk-token: '${{ secrets.SNYK_TOKEN }}' diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index e9ceb46b..2f991774 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -126,7 +126,7 @@ jobs: else VERSION="${{ inputs.version }}" fi - + # Set the appropriate env var suffix="_VERSION" if [[ "${{ inputs.type }}" == "preview" ]]; then @@ -134,7 +134,7 @@ jobs: elif [[ "${{ inputs.type }}" == "daily" ]]; then suffix="_DAILY_VERSION" fi - + product="${{ inputs.product }}" if [[ "$product" == "connect" ]] || [[ "$product" == "connect-content-init" ]] || [[ "$product" == "content-images" ]]; then product="CONNECT" @@ -143,7 +143,7 @@ jobs: else product="WORKBENCH" fi - + echo "Setting $product$suffix=$VERSION" echo "$product$suffix=$VERSION" >> $GITHUB_ENV diff --git a/.github/workflows/update-readme.yaml b/.github/workflows/update-readme.yaml index 78a9db22..0e264b21 100644 --- a/.github/workflows/update-readme.yaml +++ b/.github/workflows/update-readme.yaml @@ -24,6 +24,7 @@ jobs: - {prefix: '', repository: 'content-pro', readme_path: './content/pro/README.md'} - {prefix: 'rstudio-', repository: 'package-manager', readme_path: './package-manager/README.md'} - {prefix: '', repository: 'r-session-complete', readme_path: './r-session-complete/README.md'} + - {prefix: 'rstudio-', repository: 'workbench-for-microsoft-azure-ml', readme_path: './workbench-for-microsoft-azure-ml/README.md'} steps: - name: Check Out Repo