Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upgrade the base Python version (3.11.1 -> 3.12.2) #6

Merged
merged 10 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 19 additions & 26 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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


Expand All @@ -103,21 +103,14 @@ 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:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- 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
uses: pypa/gh-action-pypi-publish@release/v1
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/build.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Click~=8.0
Click~=8.1
2 changes: 1 addition & 1 deletion src/ai/backend/krunner/static_gnu/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.1.1"
__version__ = "4.2.0rc1"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/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.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/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}/
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11
3.12
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11
12
Original file line number Diff line number Diff line change
@@ -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/

Expand Down
11 changes: 5 additions & 6 deletions src/ai/backend/krunner/static_gnu/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
setproctitle~=1.3.2
jupyter-client~=8.6.1
setproctitle~=1.3.3