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 to 3.12.2 #4

Merged
merged 4 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
60 changes: 26 additions & 34 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,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
2 changes: 1 addition & 1 deletion src/ai/backend/krunner/alpine/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.1.0"
__version__ = "5.2.0rc1"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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}; \
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 @@
8
10
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.1-alpine3.17
FROM python:3.12.2-alpine

RUN apk add \
build-base \
Expand Down
9 changes: 4 additions & 5 deletions src/ai/backend/krunner/alpine/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
jupyter-client~=8.6.1
setproctitle~=1.3.2