From 029e9ac0588e4674676b3ceb02bf3171f736077a Mon Sep 17 00:00:00 2001 From: SACHIDANAND ALLE Date: Sun, 3 Nov 2024 21:55:18 -0800 Subject: [PATCH] Support python 3.12 (#1772) Signed-off-by: Sachidanand Alle --- .github/workflows/pythonapp.yml | 6 +++--- Dockerfile | 11 +++++------ requirements.txt | 2 +- setup.cfg | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index ca8dfff0f..c1f45112b 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -32,7 +32,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest] - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - name: Set up Python @@ -50,7 +50,7 @@ jobs: MONAI_ZOO_AUTH_TOKEN: ${{ github.token }} strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - name: Set up Python @@ -83,7 +83,7 @@ jobs: MONAI_ZOO_AUTH_TOKEN: ${{ github.token }} strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 with: diff --git a/Dockerfile b/Dockerfile index 18617c9fe..1befe0c53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,19 +14,18 @@ # to use different version of MONAI pass `--build-arg MONAI_IMAGE=...` ARG MONAI_IMAGE=projectmonai/monai:1.4.0 - ARG NODE_IMAGE=node:slim -FROM ${NODE_IMAGE} as ohifbuild -ADD . /opt/monailabel +FROM ${NODE_IMAGE} AS ohifbuild +ADD ./plugins/ohifv3 /opt/ohifv3 RUN apt update -y && apt install -y git -RUN cd /opt/monailabel/plugins/ohifv3 && ./build.sh +RUN cd /opt/ohifv3 && ./build.sh /opt/ohifv3/release -FROM ${MONAI_IMAGE} as build +FROM ${MONAI_IMAGE} AS build LABEL maintainer="monai.contact@gmail.com" ADD . /opt/monailabel/ -COPY --from=ohifbuild /opt/monailabel/monailabel/endpoints/static/ohif /opt/monailabel/monailabel/endpoints/static/ohif +COPY --from=ohifbuild /opt/ohifv3/release /opt/monailabel/monailabel/endpoints/static/ohif RUN python -m pip install --upgrade --no-cache-dir pip setuptools wheel twine \ && cd /opt/monailabel \ && BUILD_OHIF=false python setup.py sdist bdist_wheel --build-number $(date +'%Y%m%d%H%M') diff --git a/requirements.txt b/requirements.txt index 7f8a99ea7..040d0005a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,7 +28,7 @@ pydicom==2.4.4 pydicom-seg==0.4.1 pynetdicom==2.0.2 pynrrd==1.0.0 -numpymaxflow==0.0.6 +numpymaxflow==0.0.7 girder-client==3.2.3 ninja==1.11.1.1 einops==0.7.0 diff --git a/setup.cfg b/setup.cfg index a23cc7801..54c50b366 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,7 +54,7 @@ install_requires = pydicom-seg>=0.4.1 pynetdicom>=2.0.2 pynrrd>=1.0.0 - numpymaxflow>=0.0.6 + numpymaxflow>=0.0.7 girder-client>=3.2.3 ninja>=1.11.1.1 einops>=0.7.0