From 9b56e7abe420de10a2496e71367d878cba700415 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 4 Apr 2024 21:04:33 +0900 Subject: [PATCH] feat: Upgrade the base Python to 3.12.2 (#4) * ci: Update actions * feat: Upgrade the base Python version to 3.12.2 --- .github/workflows/default.yml | 60 ++++++++----------- src/ai/backend/krunner/alpine/__init__.py | 2 +- .../krunner-env.musllinux_1_2.dockerfile | 2 +- .../krunner-python.musllinux_1_2.dockerfile | 4 +- .../alpine/krunner-python.musllinux_1_2.txt | 2 +- .../alpine/krunner-version.musllinux_1_2.txt | 2 +- .../krunner-wheels.musllinux_1_2.dockerfile | 2 +- .../backend/krunner/alpine/requirements.txt | 9 ++- 8 files changed, 37 insertions(+), 46 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 038bf89..44f9a95 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,36 +89,28 @@ jobs: dist/backend.ai_krunner_alpine-${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 publish: if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') needs: [sdist, bdist_wheel] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 + environment: + name: deploy-to-pypi + url: https://pypi.org/p/backend.ai-krunner-alpine + permissions: + id-token: write steps: - - uses: actions/checkout@v3 - with: - lfs: true - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - name: Install dependencies - run: | - python -m pip install -U pip setuptools wheel - python -m pip install -U twine - 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 - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - twine upload dist/* + - name: >- + Publish 🐍📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/src/ai/backend/krunner/alpine/__init__.py b/src/ai/backend/krunner/alpine/__init__.py index 0d72820..4056e7d 100644 --- a/src/ai/backend/krunner/alpine/__init__.py +++ b/src/ai/backend/krunner/alpine/__init__.py @@ -1 +1 @@ -__version__ = "5.1.0" +__version__ = "5.2.0rc1" diff --git a/src/ai/backend/krunner/alpine/krunner-env.musllinux_1_2.dockerfile b/src/ai/backend/krunner/alpine/krunner-env.musllinux_1_2.dockerfile index 3a120ca..fe38954 100644 --- a/src/ai/backend/krunner/alpine/krunner-env.musllinux_1_2.dockerfile +++ b/src/ai/backend/krunner/alpine/krunner-env.musllinux_1_2.dockerfile @@ -33,7 +33,7 @@ RUN chmod +x ${PREFIX}/bin/ttyd RUN cd ${PREFIX}; \ tar cf /root/image.tar ./* -LABEL ai.backend.krunner.version=9 +LABEL ai.backend.krunner.version=10 CMD ["${PREFIX}/bin/python"] # vim: ft=dockerfile diff --git a/src/ai/backend/krunner/alpine/krunner-python.musllinux_1_2.dockerfile b/src/ai/backend/krunner/alpine/krunner-python.musllinux_1_2.dockerfile index 1028ece..526502a 100644 --- a/src/ai/backend/krunner/alpine/krunner-python.musllinux_1_2.dockerfile +++ b/src/ai/backend/krunner/alpine/krunner-python.musllinux_1_2.dockerfile @@ -1,9 +1,9 @@ -FROM python:3.11.2-alpine +FROM python:3.12.2-alpine ARG PREFIX=/opt/backend.ai ENV PATH=${PREFIX}/bin:$PATH ENV LANG=C.UTF-8 -ENV PYTHON_VERSION 3.11.2 +ENV PYTHON_VERSION 3.12.2 RUN mkdir -p ${PREFIX}; \ mv /usr/local/* ${PREFIX}; \ diff --git a/src/ai/backend/krunner/alpine/krunner-python.musllinux_1_2.txt b/src/ai/backend/krunner/alpine/krunner-python.musllinux_1_2.txt index 2c07333..e4fba21 100644 --- a/src/ai/backend/krunner/alpine/krunner-python.musllinux_1_2.txt +++ b/src/ai/backend/krunner/alpine/krunner-python.musllinux_1_2.txt @@ -1 +1 @@ -3.11 +3.12 diff --git a/src/ai/backend/krunner/alpine/krunner-version.musllinux_1_2.txt b/src/ai/backend/krunner/alpine/krunner-version.musllinux_1_2.txt index 301160a..9a03714 100644 --- a/src/ai/backend/krunner/alpine/krunner-version.musllinux_1_2.txt +++ b/src/ai/backend/krunner/alpine/krunner-version.musllinux_1_2.txt @@ -1 +1 @@ -8 \ No newline at end of file +10 \ No newline at end of file diff --git a/src/ai/backend/krunner/alpine/krunner-wheels.musllinux_1_2.dockerfile b/src/ai/backend/krunner/alpine/krunner-wheels.musllinux_1_2.dockerfile index 56ac376..4deefa8 100644 --- a/src/ai/backend/krunner/alpine/krunner-wheels.musllinux_1_2.dockerfile +++ b/src/ai/backend/krunner/alpine/krunner-wheels.musllinux_1_2.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11.1-alpine3.17 +FROM python:3.12.2-alpine RUN apk add \ build-base \ diff --git a/src/ai/backend/krunner/alpine/requirements.txt b/src/ai/backend/krunner/alpine/requirements.txt index 1e6963c..00fd138 100644 --- a/src/ai/backend/krunner/alpine/requirements.txt +++ b/src/ai/backend/krunner/alpine/requirements.txt @@ -1,8 +1,7 @@ -async_timeout~=4.0 -pyzmq~=25.0 -uvloop~=0.17 -attrs~=22.1 +pyzmq~=25.1 +uvloop~=0.19 +attrs~=23.2 janus~=1.0 msgpack~=1.0 -jupyter-client~=7.4.5 +jupyter-client~=8.6.1 setproctitle~=1.3.2