Python 3.11 is only supported python version (#1420)
* py311 is only supported python version Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> * update setuptools config Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> * remove ability to set python_version Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> * don't need versions Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> * drop python_verson from models Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> * drop python_version from serializer Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> * consolidate migrations Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> * more consolidatio Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> --------- Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com>
This commit is contained in:
parent
4d0c7d901a
commit
000dc60c01
|
@ -25,19 +25,7 @@ inputs:
|
|||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Build and push image with Python Version
|
||||
if: ${{inputs.pythonversion}} != ''
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: ${{inputs.platforms}}
|
||||
context: .
|
||||
file: ${{inputs.dockerfile}}
|
||||
push: true
|
||||
tags: ${{inputs.repository}}/${{inputs.name}}:${{inputs.tag}}-${{inputs.pythonversion}},${{inputs.repository}}/${{inputs.name}}:latest-${{inputs.pythonversion}}
|
||||
build-args:
|
||||
IMAGE_PY_VERSION=${{inputs.pythonversion}}
|
||||
- name: Build and push image
|
||||
if: ${{inputs.pythonversion}} == ''
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: ${{inputs.platforms}}
|
||||
|
|
|
@ -18,15 +18,7 @@ jobs:
|
|||
- Dockerfile-ray-node
|
||||
- gateway/Dockerfile
|
||||
python:
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
exclude:
|
||||
# gateway is only built using python 3.10
|
||||
- dockerfile: gateway/Dockerfile
|
||||
python: "3.9"
|
||||
- dockerfile: gateway/Dockerfile
|
||||
python: "3.11"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
- uses: actions/setup-python@v4
|
||||
name: Install Python
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: '3.11'
|
||||
- name: Install Deps
|
||||
run: pip install -U twine wheel
|
||||
- name: Build Artifacts
|
||||
|
|
|
@ -12,8 +12,6 @@ jobs:
|
|||
fail-fast: false # keep running if one leg fails
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.9'
|
||||
- '3.10'
|
||||
- '3.11'
|
||||
|
||||
defaults:
|
||||
|
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: '3.11'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
|
|
@ -12,8 +12,6 @@ jobs:
|
|||
fail-fast: false # keep running if one leg fails
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.9'
|
||||
- '3.10'
|
||||
- '3.11'
|
||||
|
||||
defaults:
|
||||
|
|
|
@ -16,23 +16,12 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- imagename: qiskit-serverless/ray-node
|
||||
pythonversion: py39
|
||||
dockerfile: Dockerfile-ray-node
|
||||
platforms: linux/amd64
|
||||
- imagename: qiskit-serverless/ray-node
|
||||
pythonversion: py310
|
||||
dockerfile: Dockerfile-ray-node
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- imagename: qiskit-serverless/ray-node
|
||||
pythonversion: py311
|
||||
dockerfile: Dockerfile-ray-node
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- imagename: qiskit-serverless/gateway
|
||||
pythonversion: ''
|
||||
dockerfile: ./gateway/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- imagename: qiskit-serverless/proxy
|
||||
pythonversion: ''
|
||||
dockerfile: ./proxy/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
steps:
|
||||
|
@ -58,7 +47,6 @@ jobs:
|
|||
name: ${{ matrix.imagename }}
|
||||
dockerfile: ${{ matrix.dockerfile }}
|
||||
platforms: ${{ matrix.platforms }}
|
||||
pythonversion: ${{ matrix.pythonversion }}
|
||||
- name: Set version from tag
|
||||
if : github.event_name == 'release' && github.event.action == 'published'
|
||||
id: set-version-from-tag
|
||||
|
@ -71,4 +59,3 @@ jobs:
|
|||
name: ${{ matrix.imagename }}
|
||||
dockerfile: ${{ matrix.dockerfile }}
|
||||
platforms: ${{ matrix.platforms }}
|
||||
pythonversion: ${{ matrix.pythonversion }}
|
||||
|
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
- name: setup python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: '3.11'
|
||||
- name: patch notebooks
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
|
@ -12,8 +12,6 @@ jobs:
|
|||
fail-fast: false # keep running if one leg fails
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.9'
|
||||
- '3.10'
|
||||
- '3.11'
|
||||
|
||||
defaults:
|
||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: '3.11'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
|
|
@ -37,7 +37,6 @@ jobs:
|
|||
sed -i "s/ray-node:${OLDNUM}/ray-node:${NEWNUM}/" charts/qiskit-serverless/charts/gateway/values.yaml
|
||||
sed -i "s/qiskit-serverless\/proxy:${OLDNUM}/qiskit-serverless\/proxy:${NEWNUM}/" charts/qiskit-serverless/charts/gateway/values.yaml
|
||||
sed -i "s/tag: \"${OLDNUM}\"/tag: \"${NEWNUM}\"/" charts/qiskit-serverless/values.yaml
|
||||
sed -i "s/tag: \"${OLDNUM}-py39\"/tag: \"${NEWNUM}-py39\"/" charts/qiskit-serverless/values.yaml
|
||||
sed -i "s/ray-node:${OLDNUM}/ray-node:${NEWNUM}/" charts/qiskit-serverless/values.yaml
|
||||
sed -i "s/version: ${OLDNUM}/version: ${NEWNUM}/" charts/qiskit-serverless/values.yaml
|
||||
sed -i "s/qiskit-serverless\/ray-node:${OLDNUM}/qiskit-serverless\/ray-node:${NEWNUM}/" docs/deployment/custom_function/Sample-Dockerfile
|
||||
|
|
2
Makefile
2
Makefile
|
@ -25,8 +25,6 @@ push-all: push-ray-node push-gateway push-proxy
|
|||
|
||||
build-ray-node:
|
||||
docker build -t $(rayNodeImageName):$(version) --build-arg TARGETARCH=$(arch) -f Dockerfile-ray-node .
|
||||
docker build -t $(rayNodeImageName):$(version)-py310 --build-arg TARGETARCH=$(arch) --build-arg IMAGE_PY_VERSION=py310 -f Dockerfile-ray-node .
|
||||
docker build -t $(rayNodeImageName):$(version)-py39 --build-arg TARGETARCH=$(arch) --build-arg IMAGE_PY_VERSION=py39 -f Dockerfile-ray-node .
|
||||
|
||||
build-gateway:
|
||||
docker build -t $(gatewayImageName):$(version) -f ./gateway/Dockerfile .
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[![Stability](https://img.shields.io/badge/stability-alpha-f4d03f.svg)](https://github.com/Qiskit/qiskit-serverless/releases)
|
||||
[![License](https://img.shields.io/github/license/qiskit-community/quantum-prototype-template?label=License)](https://github.com/qiskit-community/quantum-prototype-template/blob/main/LICENSE.txt)
|
||||
[![Code style: Black](https://img.shields.io/badge/Code%20style-Black-000.svg)](https://github.com/psf/black)
|
||||
[![Python](https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11-informational)](https://www.python.org/)
|
||||
[![Python](https://img.shields.io/badge/Python-3.11-informational)](https://www.python.org/)
|
||||
[![Qiskit](https://img.shields.io/badge/Qiskit-%E2%89%A5%201.0.0-6133BD)](https://github.com/Qiskit/qiskit)
|
||||
|
||||
# Qiskit Serverless
|
||||
|
|
|
@ -306,10 +306,6 @@ spec:
|
|||
value: {{ .Release.Namespace }}
|
||||
- name: RAY_NODE_IMAGE
|
||||
value: {{ .Values.application.ray.nodeImage | quote }}
|
||||
- name: RAY_NODE_IMAGE_PY39
|
||||
value: {{ .Values.application.ray.nodeImage_py39 | quote }}
|
||||
- name: RAY_NODE_IMAGE_PY310
|
||||
value: {{ .Values.application.ray.nodeImage_py310 | quote }}
|
||||
- name: LIMITS_JOBS_PER_USER
|
||||
value: {{ .Values.application.limits.maxJobsPerUser | quote }}
|
||||
- name: LIMITS_MAX_CLUSTERS
|
||||
|
|
|
@ -18,9 +18,7 @@ application:
|
|||
superuser:
|
||||
enable: true
|
||||
ray:
|
||||
nodeImage: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py39"
|
||||
nodeImage_py39: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py39"
|
||||
nodeImage_py310: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py310"
|
||||
nodeImage: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1"
|
||||
cpu: 2
|
||||
memory: 2
|
||||
replicas: 1
|
||||
|
|
|
@ -59,7 +59,7 @@ gateway:
|
|||
type: ClusterIP
|
||||
port: 8000
|
||||
ray:
|
||||
nodeImage: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py310"
|
||||
nodeImage: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1"
|
||||
opensslImage: registry.access.redhat.com/ubi8/openssl:8.8-9
|
||||
kubectlImage: alpine/k8s:1.29.2@sha256:a51aa37f0a34ff827c7f2f9cb7f6fbb8f0e290fa625341be14c2fcc4b1880f60
|
||||
limits:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
[![Client verify process](https://github.com/Qiskit/qiskit-serverless/actions/workflows/client-verify.yaml/badge.svg)](https://github.com/Qiskit/qiskit-serverless/actions/workflows/client-verify.yaml)
|
||||
[![License](https://img.shields.io/github/license/qiskit-community/quantum-prototype-template?label=License)](https://github.com/qiskit-community/quantum-prototype-template/blob/main/LICENSE.txt)
|
||||
[![Code style: Black](https://img.shields.io/badge/Code%20style-Black-000.svg)](https://github.com/psf/black)
|
||||
[![Python](https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11-informational)](https://www.python.org/)
|
||||
[![Python](https://img.shields.io/badge/Python-3.11-informational)](https://www.python.org/)
|
||||
[![Qiskit](https://img.shields.io/badge/Qiskit-%E2%89%A5%200.39.0-6133BD)](https://github.com/Qiskit/qiskit)
|
||||
|
||||
# Qiskit Serverless client
|
||||
|
|
|
@ -84,16 +84,12 @@ class Configuration: # pylint: disable=too-many-instance-attributes
|
|||
auto_scaling: set True to enable auto scating of the workers
|
||||
min_workers: minimum number of workers when auto scaling is enabled
|
||||
max_workers: maxmum number of workers when auto scaling is enabled
|
||||
python_version: python version string of program execution worker node
|
||||
"""
|
||||
|
||||
workers: Optional[int] = None
|
||||
min_workers: Optional[int] = None
|
||||
max_workers: Optional[int] = None
|
||||
auto_scaling: Optional[bool] = False
|
||||
python_version: Optional[str] = ""
|
||||
PYTHON_V3_9 = "py39"
|
||||
PYTHON_V3_10 = "py310"
|
||||
|
||||
|
||||
class BaseJobClient:
|
||||
|
|
|
@ -23,7 +23,7 @@ setuptools.setup(
|
|||
keywords="qiskit serverless quantum computing",
|
||||
packages=setuptools.find_packages(),
|
||||
install_requires=install_requires,
|
||||
python_requires=">=3.9",
|
||||
python_requires=">=3.11",
|
||||
version=version,
|
||||
classifiers=[
|
||||
"Development Status :: 3 - Alpha",
|
||||
|
@ -34,8 +34,6 @@ setuptools.setup(
|
|||
"Operating System :: MacOS",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
"Operating System :: Microsoft :: Windows",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Topic :: Scientific/Engineering :: Physics",
|
||||
],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tox]
|
||||
minversion = 2.1
|
||||
envlist = py39, py310, py311, lint, coverage
|
||||
envlist = py311, lint, coverage
|
||||
# CI: skip-next-line
|
||||
skipsdist = true
|
||||
# CI: skip-next-line
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 5.0.7 on 2024-07-30 14:59
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("api", "0026_merge_20240613_1848"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name="jobconfig",
|
||||
name="python_version",
|
||||
),
|
||||
]
|
|
@ -39,21 +39,6 @@ class JobConfig(models.Model):
|
|||
null=True,
|
||||
)
|
||||
|
||||
PYTHON_V3_8 = "py38"
|
||||
PYTHON_V3_9 = "py39"
|
||||
PYTHON_V3_10 = "py310"
|
||||
PYTHON_VERSIONS = [
|
||||
(PYTHON_V3_8, "Version 3.8"),
|
||||
(PYTHON_V3_9, "Version 3.9"),
|
||||
(PYTHON_V3_10, "Version 3.10"),
|
||||
]
|
||||
python_version = models.CharField(
|
||||
max_length=6,
|
||||
choices=PYTHON_VERSIONS,
|
||||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.id}"
|
||||
|
||||
|
|
|
@ -234,19 +234,6 @@ def create_ray_cluster( # pylint: disable=too-many-branches
|
|||
job_config.max_workers = settings.RAY_CLUSTER_WORKER_MAX_REPLICAS
|
||||
if not job_config.auto_scaling:
|
||||
job_config.auto_scaling = settings.RAY_CLUSTER_WORKER_AUTO_SCALING
|
||||
if not job_config.python_version:
|
||||
job_config.python_version = "default"
|
||||
|
||||
if job_config.python_version in settings.RAY_NODE_IMAGES_MAP:
|
||||
node_image = settings.RAY_NODE_IMAGES_MAP[job_config.python_version]
|
||||
else:
|
||||
message = (
|
||||
f"Specified python version {job_config.python_version} "
|
||||
"not in a list of supported python versions "
|
||||
f"{list(settings.RAY_NODE_IMAGES_MAP.keys())}. "
|
||||
"Default image will be used instead."
|
||||
)
|
||||
logger.warning(message)
|
||||
node_image = settings.RAY_NODE_IMAGE
|
||||
|
||||
# if user specified image use specified image
|
||||
|
|
|
@ -141,15 +141,6 @@ class JobConfigSerializer(serializers.ModelSerializer):
|
|||
auto_scaling = serializers.BooleanField(
|
||||
default=False, required=False, allow_null=True
|
||||
)
|
||||
python_version = serializers.ChoiceField(
|
||||
choices=(
|
||||
("py39", "Version 3.9"),
|
||||
("py310", "Version 3.10"),
|
||||
),
|
||||
required=False,
|
||||
allow_null=True,
|
||||
allow_blank=True,
|
||||
)
|
||||
|
||||
|
||||
class ProgramSerializer(serializers.ModelSerializer):
|
||||
|
|
|
@ -101,7 +101,6 @@ class JobConfigSerializer(serializers.JobConfigSerializer):
|
|||
"min_workers",
|
||||
"max_workers",
|
||||
"auto_scaling",
|
||||
"python_version",
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -320,13 +320,8 @@ RAY_CLUSTER_MODE = {
|
|||
),
|
||||
}
|
||||
RAY_NODE_IMAGE = os.environ.get(
|
||||
"RAY_NODE_IMAGE", "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py310"
|
||||
"RAY_NODE_IMAGE", "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1"
|
||||
)
|
||||
RAY_NODE_IMAGES_MAP = {
|
||||
"default": RAY_NODE_IMAGE,
|
||||
"py39": os.environ.get("RAY_NODE_IMAGE_PY39", RAY_NODE_IMAGE),
|
||||
"py310": os.environ.get("RAY_NODE_IMAGE_PY310", RAY_NODE_IMAGE),
|
||||
}
|
||||
RAY_CLUSTER_WORKER_REPLICAS = int(os.environ.get("RAY_CLUSTER_WORKER_REPLICAS", "1"))
|
||||
RAY_CLUSTER_WORKER_REPLICAS_MAX = int(
|
||||
os.environ.get("RAY_CLUSTER_WORKER_REPLICAS_MAX", "5")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tox]
|
||||
minversion = 2.1
|
||||
envlist = py39, py310, py311, lint, coverage
|
||||
envlist = py311, lint, coverage
|
||||
# CI: skip-next-line
|
||||
skipsdist = true
|
||||
# CI: skip-next-line
|
||||
|
|
Loading…
Reference in New Issue