From 78a6bb5a885e177bf446aba441efc66ec873b4da Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 18:44:40 +0900 Subject: [PATCH 01/10] feat: Upgrade the base Python version (3.11.1 -> 3.12.2) --- .../krunner/static_gnu/krunner-env.static-gnu.dockerfile | 2 +- .../krunner/static_gnu/krunner-python.static-gnu.dockerfile | 6 +++--- .../krunner/static_gnu/krunner-python.static-gnu.txt | 2 +- .../krunner/static_gnu/krunner-wheels.static-gnu.dockerfile | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ai/backend/krunner/static_gnu/krunner-env.static-gnu.dockerfile b/src/ai/backend/krunner/static_gnu/krunner-env.static-gnu.dockerfile index e851a74..93e82c1 100644 --- a/src/ai/backend/krunner/static_gnu/krunner-env.static-gnu.dockerfile +++ b/src/ai/backend/krunner/static_gnu/krunner-env.static-gnu.dockerfile @@ -29,7 +29,7 @@ RUN chmod +x ${PREFIX}/bin/ttyd RUN cd ${PREFIX}; \ tar cf /root/image.tar ./* -LABEL ai.backend.krunner.version=11 +LABEL ai.backend.krunner.version=12 CMD ["${PREFIX}/bin/python"] # vim: ft=dockerfile diff --git a/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.dockerfile b/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.dockerfile index 1ebe6c7..0236f4b 100644 --- a/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.dockerfile +++ b/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.dockerfile @@ -6,7 +6,7 @@ ARG PREFIX=/opt/backend.ai ARG ARCH=x86_64 ENV PATH=${PREFIX}/bin:$PATH \ - PYTHON_VERSION=3.11.1 \ + PYTHON_VERSION=3.12.2 \ LANG=C.UTF-8 RUN <<-EOF @@ -27,9 +27,9 @@ RUN <<-EOF mkdir -p ${PREFIX} cd /root if [ "${ARCH}" = "x86_64" ]; then - wget -q -O python.tar.zst "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-x86_64_v2-unknown-linux-gnu-pgo-full.tar.zst" + wget -q -O python.tar.zst "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.12.2+20240224-x86_64_v2-unknown-linux-gnu-pgo-full.tar.zst" else - wget -q -O python.tar.zst "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-aarch64-unknown-linux-gnu-noopt-full.tar.zst" + wget -q -O python.tar.zst "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.12.2+20240224-aarch64-unknown-linux-gnu-noopt-full.tar.zst" fi tar -I zstd -xC . --strip-components=1 -f python.tar.zst mv /root/install/* ${PREFIX}/ diff --git a/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.txt b/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.txt index 2c07333..e4fba21 100644 --- a/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.txt +++ b/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.txt @@ -1 +1 @@ -3.11 +3.12 diff --git a/src/ai/backend/krunner/static_gnu/krunner-wheels.static-gnu.dockerfile b/src/ai/backend/krunner/static_gnu/krunner-wheels.static-gnu.dockerfile index 87c6dfc..20a611a 100644 --- a/src/ai/backend/krunner/static_gnu/krunner-wheels.static-gnu.dockerfile +++ b/src/ai/backend/krunner/static_gnu/krunner-wheels.static-gnu.dockerfile @@ -1,7 +1,7 @@ ARG ARCH=x86_64 FROM quay.io/pypa/manylinux2014_${ARCH} -ENV PATH=$PATH:/opt/python/cp311-cp311/bin +ENV PATH=$PATH:/opt/python/cp312-cp312/bin COPY requirements.txt /root/ From dbb930f9361c4d9f10f6caf9fa1cd06488dc83e3 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 18:51:08 +0900 Subject: [PATCH 02/10] fix: Update the build instruction --- README.md | 5 +++-- requirements/build.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 27de2a5..77e95b4 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,11 @@ binaries and does not work as intended. Just refer this repository on how we bu ```console $ git clone https://github.com/lablup/backend.ai-krunner-{distro} krunner-{distro} $ cd krunner-{distro} -$ pyenv virtualenv 3.11.2 venv-krunner # you may share the same venv with other krunner projects +$ pyenv virtualenv 3.12.2 venv-krunner # you may share the same venv with other krunner projects $ pyenv local venv-krunner $ pip install -U pip setuptools -$ pip install -U click -e . +$ pip install -U -r build/requirements.txt +$ pip install -U -e . ``` ## How to update diff --git a/requirements/build.txt b/requirements/build.txt index 87b32d8..3509f99 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1 +1 @@ -Click~=8.0 +Click~=8.1 From 2b970946bb9dac0face5c0428c79e9abc51f4543 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 18:54:11 +0900 Subject: [PATCH 03/10] feat: Update the krunner dependencies --- src/ai/backend/krunner/static_gnu/requirements.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ai/backend/krunner/static_gnu/requirements.txt b/src/ai/backend/krunner/static_gnu/requirements.txt index 1e6963c..c7bf7d7 100644 --- a/src/ai/backend/krunner/static_gnu/requirements.txt +++ b/src/ai/backend/krunner/static_gnu/requirements.txt @@ -1,8 +1,7 @@ -async_timeout~=4.0 -pyzmq~=25.0 -uvloop~=0.17 +pyzmq~=25.1 +uvloop~=0.19 attrs~=22.1 janus~=1.0 msgpack~=1.0 -jupyter-client~=7.4.5 -setproctitle~=1.3.2 +jupyter-client~=8.6.1 +setproctitle~=1.3.3 From ea1850db531a38bd4fdf9257a26ac35e4556f930 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 19:04:06 +0900 Subject: [PATCH 04/10] fix: Update attrs as well --- src/ai/backend/krunner/static_gnu/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai/backend/krunner/static_gnu/requirements.txt b/src/ai/backend/krunner/static_gnu/requirements.txt index c7bf7d7..0f8246f 100644 --- a/src/ai/backend/krunner/static_gnu/requirements.txt +++ b/src/ai/backend/krunner/static_gnu/requirements.txt @@ -1,6 +1,6 @@ pyzmq~=25.1 uvloop~=0.19 -attrs~=22.1 +attrs~=23.2 janus~=1.0 msgpack~=1.0 jupyter-client~=8.6.1 From 7e7e5630ef5fb7e71f7347e386984f8c24016836 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 20:12:00 +0900 Subject: [PATCH 05/10] fix: typo --- .../krunner/static_gnu/krunner-python.static-gnu.dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.dockerfile b/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.dockerfile index 0236f4b..9a0b51f 100644 --- a/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.dockerfile +++ b/src/ai/backend/krunner/static_gnu/krunner-python.static-gnu.dockerfile @@ -27,9 +27,9 @@ RUN <<-EOF mkdir -p ${PREFIX} cd /root if [ "${ARCH}" = "x86_64" ]; then - wget -q -O python.tar.zst "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.12.2+20240224-x86_64_v2-unknown-linux-gnu-pgo-full.tar.zst" + wget -q -O python.tar.zst "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2+20240224-x86_64_v2-unknown-linux-gnu-pgo-full.tar.zst" else - wget -q -O python.tar.zst "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.12.2+20240224-aarch64-unknown-linux-gnu-noopt-full.tar.zst" + wget -q -O python.tar.zst "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2+20240224-aarch64-unknown-linux-gnu-noopt-full.tar.zst" fi tar -I zstd -xC . --strip-components=1 -f python.tar.zst mv /root/install/* ${PREFIX}/ From 699e9c603e8dfd5a76f741bc509d6794292b4f38 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 20:14:17 +0900 Subject: [PATCH 06/10] feat: Bump the volume version --- .../backend/krunner/static_gnu/krunner-version.static-gnu.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai/backend/krunner/static_gnu/krunner-version.static-gnu.txt b/src/ai/backend/krunner/static_gnu/krunner-version.static-gnu.txt index b4de394..3cacc0b 100644 --- a/src/ai/backend/krunner/static_gnu/krunner-version.static-gnu.txt +++ b/src/ai/backend/krunner/static_gnu/krunner-version.static-gnu.txt @@ -1 +1 @@ -11 +12 \ No newline at end of file From be779437462e867a4d5d1594409fe829bf4173eb Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 20:21:11 +0900 Subject: [PATCH 07/10] ci: Upgrade actions Note that actions/upload-artifact and actions/download-artifact v2 -> v4 upgrade involves a breaking change: https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md --- .github/workflows/default.yml | 41 ++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 826bbee..b343c2a 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -6,16 +6,16 @@ jobs: sdist: if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: lfs: true - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Install dependencies run: | python -m pip install -U pip setuptools wheel @@ -24,9 +24,9 @@ jobs: python setup.py sdist ls -lh dist - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: dist + name: dist-src path: dist @@ -37,8 +37,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04] - pyver: [cp311-cp311] + os: [ubuntu-22.04] + pyver: [cp312-cp312] arch: [x86_64, aarch64] env: @@ -47,16 +47,16 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: lfs: true - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Set up QEMU id: qemu - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Show available platforms run: echo ${{ steps.qemu.outputs.platforms }} - name: Install dependencies @@ -89,9 +89,9 @@ jobs: dist/backend.ai_krunner_static_gnu-${PKGVER}-py3-none-${GLIBC_PTAG}.${MUSL_PTAG}.${MACOS_PTAG}.whl ls -lh dist - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: dist + name: dist-${{ matrix.os }}-${{ matrix.pyver }}-${{ matrix.arch }} path: dist @@ -105,19 +105,20 @@ jobs: id-token: write runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Install dependencies run: | python -m pip install -U pip setuptools wheel - name: Download distributions - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - name: dist + pattern: dist-* + merge-multiple: true path: dist - name: >- Publish 🐍📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file + uses: pypa/gh-action-pypi-publish@release/v1 From 2491a7b833ce33171f03e1bb86b3344e031abcc1 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 20:24:29 +0900 Subject: [PATCH 08/10] release: 4.2.0rc1 --- src/ai/backend/krunner/static_gnu/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai/backend/krunner/static_gnu/__init__.py b/src/ai/backend/krunner/static_gnu/__init__.py index 72aa758..6287d25 100644 --- a/src/ai/backend/krunner/static_gnu/__init__.py +++ b/src/ai/backend/krunner/static_gnu/__init__.py @@ -1 +1 @@ -__version__ = "4.1.1" +__version__ = "4.2.0rc1" From 686c541fe7037d33768fb39ec21dfd2321cb25a3 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 20:41:43 +0900 Subject: [PATCH 09/10] ci: There is no need to checkout and install for deploy-to-pypi action --- .github/workflows/default.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index b343c2a..d0da6d3 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -105,14 +105,6 @@ jobs: id-token: write runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Install dependencies - run: | - python -m pip install -U pip setuptools wheel - name: Download distributions uses: actions/download-artifact@v4 with: From f3b3d4f9febe58e699cc9e7b7670b2edbac6d3e3 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 21:05:06 +0900 Subject: [PATCH 10/10] ci: Fix missing update --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index d0da6d3..83cf5b2 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -103,7 +103,7 @@ jobs: url: https://pypi.org/p/backend.ai-krunner-static-gnu permissions: id-token: write - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Download distributions uses: actions/download-artifact@v4