diff --git a/.github/workflows/jwa_backend_unittests.yaml b/.github/workflows/jwa_backend_unittests.yaml index 184634a7b..933b4d56c 100644 --- a/.github/workflows/jwa_backend_unittests.yaml +++ b/.github/workflows/jwa_backend_unittests.yaml @@ -25,7 +25,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: "3.7" + python-version: "3.12" - name: Setup Python environment run: | diff --git a/.github/workflows/python_lint.yaml b/.github/workflows/python_lint.yaml index aa0a60586..034027bd8 100644 --- a/.github/workflows/python_lint.yaml +++ b/.github/workflows/python_lint.yaml @@ -17,10 +17,10 @@ jobs: - name: Checkout source repository uses: actions/checkout@v4 - - name: Set up Python environment 3.8 + - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.12" - name: flake8 Lint uses: py-actions/flake8@v2 diff --git a/components/crud-web-apps/common/README.md b/components/crud-web-apps/common/README.md index 5e33cf788..fc1160673 100644 --- a/components/crud-web-apps/common/README.md +++ b/components/crud-web-apps/common/README.md @@ -45,7 +45,7 @@ In order to build a Docker image and use this code you coud build a wheel and th ```dockerfile ### Docker -FROM python:3.7 AS backend-kubeflow-wheel +FROM python:3.12 AS backend-kubeflow-wheel WORKDIR /src COPY ./components/crud-web-apps/common/backend . @@ -54,7 +54,7 @@ RUN python3 setup.py bdist_wheel ... # Web App -FROM python:3.7 +FROM python:3.12 WORKDIR /package COPY --from=backend-kubeflow-wheel /src . diff --git a/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/__init__.py b/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/__init__.py index 9a2356ab2..6f46b0872 100644 --- a/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/__init__.py +++ b/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/__init__.py @@ -23,7 +23,7 @@ def create_app(name, static_folder, config): if (config.ENV == BackendMode.DEVELOPMENT.value or config.ENV == BackendMode.DEVELOPMENT_FULL.value): # noqa: W503 - log.warn("RUNNING IN DEVELOPMENT MODE") + log.warning("RUNNING IN DEVELOPMENT MODE") # Register all the blueprints app.register_blueprint(authn_bp) diff --git a/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/config.py b/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/config.py index 052999904..c412adc52 100644 --- a/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/config.py +++ b/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/config.py @@ -59,7 +59,7 @@ class DevConfig(Config): def __init__(self): super() - log.warn("RUNNING IN DEVELOPMENT MODE") + log.warning("RUNNING IN DEVELOPMENT MODE") class ProdConfig(Config): diff --git a/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/requirements.txt b/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/requirements.txt deleted file mode 100644 index 36f7b6f81..000000000 --- a/components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -Flask==1.1.1 -Flask-API==2.0 -kubernetes==10.0.1 -requests==2.22.0 -urllib3==1.26.18 -Werkzeug==0.16.0 diff --git a/components/crud-web-apps/common/backend/setup.py b/components/crud-web-apps/common/backend/setup.py index d98ba45a4..5e52ef05a 100644 --- a/components/crud-web-apps/common/backend/setup.py +++ b/components/crud-web-apps/common/backend/setup.py @@ -1,16 +1,15 @@ import setuptools REQUIRES = [ - "Flask >= 1.1.1", + "Flask >= 2.3.2", "Flask-API >= 2.0", - "kubernetes == 22.6.0", - "requests >= 2.22.0", - "urllib3 >= 1.25.7", - "Werkzeug >= 0.16.0", + "kubernetes == 34.1.0", + "requests", + "urllib3", + "Werkzeug >= 3.0.6", "Flask-Cors >= 3.0.8", "gevent", "prometheus-flask-exporter >= 0.23.1", - "importlib-metadata >= 1.0;python_version<'3.8'", ] setuptools.setup( @@ -27,5 +26,5 @@ "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", ], - python_requires=">=3.6", + python_requires=">=3.12", ) diff --git a/components/crud-web-apps/jupyter/Dockerfile b/components/crud-web-apps/jupyter/Dockerfile index 7fd3c169c..bed75fc8b 100644 --- a/components/crud-web-apps/jupyter/Dockerfile +++ b/components/crud-web-apps/jupyter/Dockerfile @@ -1,10 +1,12 @@ # --- Build the backend kubeflow-wheel --- -FROM python:3.10-slim AS backend-kubeflow-wheel +# Python 3.12 upgrade +FROM python:3.12-slim AS backend-kubeflow-wheel WORKDIR /src COPY ./common/backend/ . -RUN python3 setup.py bdist_wheel +RUN pip install --no-cache-dir setuptools wheel && \ + python3 setup.py bdist_wheel # --- Build the frontend kubeflow library --- FROM node:16.20.2-bullseye as frontend-kubeflow-lib @@ -41,7 +43,7 @@ COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/ RUN npm run build -- --output-path=./dist/default --configuration=production # Web App -FROM python:3.10-slim +FROM python:3.12-slim WORKDIR /package COPY --from=backend-kubeflow-wheel /src . diff --git a/components/crud-web-apps/jupyter/README.md b/components/crud-web-apps/jupyter/README.md index d32778de6..8071cddae 100644 --- a/components/crud-web-apps/jupyter/README.md +++ b/components/crud-web-apps/jupyter/README.md @@ -32,7 +32,7 @@ with a [configmap](./manifests/base/configs/logos-configmap.yaml) to make it eas Requirements: * node 16.20.2 -* python 3.8 +* python 3.12 ### Frontend @@ -64,8 +64,8 @@ cd components/crud-web-apps/jupyter # create a virtual env and install deps # https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ -python3.8 -m pip install --user virtualenv -python3.8 -m venv web-apps-dev +python3.12 -m pip install --user virtualenv +python3.12 -m venv web-apps-dev source web-apps-dev/bin/activate # install the deps on the activated virtual env diff --git a/components/crud-web-apps/tensorboards/Dockerfile b/components/crud-web-apps/tensorboards/Dockerfile index bd060c7ca..441f21c32 100644 --- a/components/crud-web-apps/tensorboards/Dockerfile +++ b/components/crud-web-apps/tensorboards/Dockerfile @@ -1,10 +1,12 @@ # --- Build the backend kubeflow-wheel --- -FROM python:3.10-slim AS backend-kubeflow-wheel +# Python 3.12 upgrade +FROM python:3.12-slim AS backend-kubeflow-wheel WORKDIR /src COPY ./common/backend/ . -RUN python3 setup.py bdist_wheel +RUN pip install --no-cache-dir setuptools wheel && \ + python3 setup.py bdist_wheel # --- Build the frontend kubeflow library --- FROM node:16.20.2-bullseye as frontend-kubeflow-lib @@ -41,7 +43,7 @@ COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/ RUN npm run build -- --output-path=./dist --configuration=production # Web App -FROM python:3.10-slim +FROM python:3.12-slim WORKDIR /package COPY --from=backend-kubeflow-wheel /src . diff --git a/components/crud-web-apps/tensorboards/README.md b/components/crud-web-apps/tensorboards/README.md index 7a14c84df..f31687cd1 100644 --- a/components/crud-web-apps/tensorboards/README.md +++ b/components/crud-web-apps/tensorboards/README.md @@ -13,7 +13,7 @@ This web app is responsible for allowing the user to manipulate Tensorboard inst Requirements: * node 16.20.2 -* python 3.8 +* python 3.12 ### Frontend @@ -37,8 +37,8 @@ npm run build:watch # create a virtual env and install deps # https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ cd component/crud-web-apps/tensorboards/backend -python3.8 -m pip install --user virtualenv -python3.8 -m venv web-apps-dev +python3.12 -m pip install --user virtualenv +python3.12 -m venv web-apps-dev source web-apps-dev/bin/activate # install the deps on the activated virtual env diff --git a/components/crud-web-apps/volumes/Dockerfile b/components/crud-web-apps/volumes/Dockerfile index ba6dbbc1d..17dd90b42 100644 --- a/components/crud-web-apps/volumes/Dockerfile +++ b/components/crud-web-apps/volumes/Dockerfile @@ -1,10 +1,12 @@ # --- Build the backend kubeflow-wheel --- -FROM python:3.10-slim AS backend-kubeflow-wheel +# Python 3.12 upgrade +FROM python:3.12-slim AS backend-kubeflow-wheel WORKDIR /src COPY ./common/backend/ . -RUN python3 setup.py bdist_wheel +RUN pip install --no-cache-dir setuptools wheel && \ + python3 setup.py bdist_wheel # --- Build the frontend kubeflow library --- FROM node:16.20.2-bullseye as frontend-kubeflow-lib @@ -41,7 +43,7 @@ COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/ RUN npm run build -- --output-path=./dist/default --configuration=production # Web App -FROM python:3.10-slim +FROM python:3.12-slim WORKDIR /package COPY --from=backend-kubeflow-wheel /src . diff --git a/components/crud-web-apps/volumes/README.md b/components/crud-web-apps/volumes/README.md index 701aa53e3..d2fafd367 100644 --- a/components/crud-web-apps/volumes/README.md +++ b/components/crud-web-apps/volumes/README.md @@ -6,7 +6,7 @@ This web app is responsible for allowing the user to manipulate PVCs in their Ku Requirements: * node 16.20.2 -* python 3.8 +* python 3.12 ### Frontend @@ -30,8 +30,8 @@ npm run build:watch # create a virtual env and install deps # https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ cd component/crud-web-apps/volumes/backend -python3.8 -m pip install --user virtualenv -python3.8 -m venv web-apps-dev +python3.12 -m pip install --user virtualenv +python3.12 -m venv web-apps-dev source web-apps-dev/bin/activate # install the deps on the activated virtual env