diff --git a/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/cmd.sh b/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/cmd.sh old mode 100644 new mode 100755 index 18ece948d3..92ab482d29 --- a/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/cmd.sh +++ b/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/cmd.sh @@ -1,68 +1,68 @@ #!/bin/sh set -x export SRC_DIR="/tmp/mitk" export BLD_DIR="/tmp/bin" export OUT_DIR="/var/io" -MITK_GIT_TAG=T24046-SwigBasedPythonWrapping +MITK_GIT_TAG=T25826-RadiomicsGUIUpdate PYTHON_VERSIONS=${PYTHON_VERSIONS:-$(ls /opt/python | sed -e 's/cp2[0-6][^ ]\+ \?//g')} NPROC=$(grep -c processor /proc/cpuinfo) export MAKEFLAGS="-j ${NPROC}" function build_mitk { echo "MITK_GIT_TAG: ${MITK_GIT_TAG}" git clone https://phabricator.mitk.org/source/mitk.git ${SRC_DIR} && (cd ${SRC_DIR} && git checkout ${MITK_GIT_TAG} ) && rm -rf ${BLD_DIR} && mkdir -p ${BLD_DIR} && cd ${BLD_DIR} && cmake \ -DBUILD_TESTING:BOOL=OFF \ -DMITK_USE_SWIG:BOOL=ON \ -DMITK_USE_MatchPoint=ON\ -DMITK_USE_Vigra=ON\ -DMITK_USE_Qt5:BOOL=OFF \ -DMITK_USE_CTK:BOOL=OFF \ -DMITK_USE_BLUEBERRY:BOOL=OFF \ -DCMAKE_C_COMPILER:FILEPATH=/usr/local/bin/gcc \ -DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/bin/g++ \ -DMITK_WHITELIST:STRING=Wrapping \ -DCMAKE_BUILD_TYPE:STRING=Release \ ${SRC_DIR} && make -j8 } function build_mitk_python { PYTHON_EXECUTABLE=/opt/python/${PYTHON}/bin/python PYTHON_INCLUDE_DIR="$( find -L /opt/python/${PYTHON}/include/ -name Python.h -exec dirname {} \; )" echo "" echo "PYTHON_EXECUTABLE:${PYTHON_EXECUTABLE}" echo "PYTHON_INCLUDE_DIR:${PYTHON_INCLUDE_DIR}" echo "PYTHON_LIBRARY:${PYTHON_LIBRARY}" cd ${BLD_DIR}/MITK-build && cmake \ -DWRAP_PYTHON:BOOL=ON \ -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR} \ -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE} \ . make dist -B } build_mitk || exit 1 for PYTHON in ${PYTHON_VERSIONS}; do build_mitk_python && auditwheel repair $(find ${BLD_DIR}/MITK-build/Wrapping/Python/dist -name pyMITK*.whl) -w ${OUT_DIR}/wheelhouse/ rm $(find ${BLD_DIR}/MITK-build/Wrapping/Python/dist/ -name pyMITK*.whl) done diff --git a/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/install-gcc.sh b/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/install-gcc.sh old mode 100644 new mode 100755 diff --git a/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/install-libtiff.sh b/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/install-libtiff.sh old mode 100644 new mode 100755 diff --git a/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/install.sh b/Wrapping/Python/PackageUtility/PythonWheelDocker/imagefiles/install.sh old mode 100644 new mode 100755 diff --git a/Wrapping/Python/PackageUtility/PythonWheelDocker/run.sh b/Wrapping/Python/PackageUtility/PythonWheelDocker/run.sh old mode 100644 new mode 100755 index 81c8549417..d8d98da483 --- a/Wrapping/Python/PackageUtility/PythonWheelDocker/run.sh +++ b/Wrapping/Python/PackageUtility/PythonWheelDocker/run.sh @@ -1,26 +1,27 @@ #!/bin/sh if [ -n "$ExternalData_OBJECT_STORES" -a -d "$ExternalData_OBJECT_STORES" ] ; then extra_args="-v ${ExternalData_OBJECT_STORES}:/var/io/.ExternalData -e ExternalData_OBJECT_STORES=/var/io/.ExternalData" fi if [ ! -z "${MITK_GIT_TAG}" ] ; then extra_args="${extra_args} -e MITK_GIT_TAG=${MITK_GIT_TAG}" fi # example versions: "cp27-cp27m cp27-cp27mu cp36-cp36m" if [ ! -z "${PYTHON_VERSIONS}" ] ; then extra_args="${extra_args} -e PYTHON_VERSIONS=${PYTHON_VERSIONS}" fi for ARCH in x86_64; do # Docker container is build for a specific target plattfrom. - docker build --pull=true --rm=true -t mitk_manylinux_${ARCH} -f Dockerfile-${ARCH} . + # docker build --pull=true --rm=true -t mitk_manylinux_${ARCH} -f Dockerfile-${ARCH} . + docker build --pull=true -t mitk_manylinux_${ARCH} -f dockerfile-${ARCH} # Docker file is ran in order to generate the python wheels in it. docker run --storage-opt size=150G --rm -e _USER=$(id -un) -e _USERID=$(id -u) -e_GROUPID=$(id -g) $extra_args -v $(pwd):/work/io -t pymitk_manylinux_${ARCH} # use this command to get an interactive prompt to debug behavior #docker run --rm -i -t --entrypoint=/bin/bash -u=root $extra_args -v $(pwd):/var/io mitk_manylinux_${ARCH} done diff --git a/Wrapping/Python/PackageUtility/UbuntuPackageDocker/Dockerfile b/Wrapping/Python/PackageUtility/UbuntuPackageDocker/Dockerfile index 33a4b90ca2..af276b6bb5 100644 --- a/Wrapping/Python/PackageUtility/UbuntuPackageDocker/Dockerfile +++ b/Wrapping/Python/PackageUtility/UbuntuPackageDocker/Dockerfile @@ -1,111 +1,110 @@ -FROM ubuntu:16.04 +FROM ubuntu:16.04 as builder MAINTAINER Michael WORKDIR /opt # Define the target software versions ENV QT_VERSION_A=5.11 ENV QT_VERSION_B=5.11.2 ENV CMAKE_VERSION_A=3.11 ENV CMAKE_VERSION_B=3.11.4 ENV MITK_HASH T24609-v2018.04-alpha # These lines are necessary in order to be able to updates the packages from within the DKFZ Network ENV http_proxy http://www-int2.dkfz-heidelberg.de:3128/ ENV https_proxy https://www-int2.dkfz-heidelberg.de:3128/ # Basic development tools RUN apt-get -y update && apt-get -y install \ build-essential \ git \ libfontconfig1-dev \ libwrap0-dev \ libglu1-mesa-dev \ wget \ libxt-dev \ libtiff5-dev \ libdbus-1-3 \ libwrap0-dev \ patchelf # Python development tools RUN apt-get -y update && apt-get -y install \ cython \ python-pip \ unzip \ libsundials-serial-dev \ - python3-pip \ - auditwheel - libglu1-mesa-dev \ - wget \ - libxt-dev \ - libtiff5-dev \ - libdbus-1-3 \ - libwrap0-dev \ - patchelf + python3-pip + #auditwheel RUN mkdir /opt/mitk-bin \ && mkdir /opt/bin -ENV QT_VERSION_SCRIPT=594 -RUN wget https://download.qt.io/archive/qt/${QT_VERSION_A}/${QT_VERSION_B}/qt-opensource-linux-x64-${QT_VERSION_B}.run -RUN chmod +x qt-opensource-linux-x64-${QT_VERSION_B}.run +#ENV QT_VERSION_SCRIPT=594 COPY files/qt-noninteractive.qs /opt/qt-noninteractive.qs -RUN ./qt-opensource-linux-x64-${QT_VERSION_B}.run --script /opt/qt-noninteractive.qs -platform minimal +RUN wget https://download.qt.io/archive/qt/${QT_VERSION_A}/${QT_VERSION_B}/qt-opensource-linux-x64-${QT_VERSION_B}.run \ + && chmod +x qt-opensource-linux-x64-${QT_VERSION_B}.run \ + && ./qt-opensource-linux-x64-${QT_VERSION_B}.run --script /opt/qt-noninteractive.qs -platform minimal --proxy --verbose #COPY files/cmake-3.10.3-Linux-x86_64.sh /cmake-3.10.3-Linux-x86_64.sh -RUN wget https://cmake.org/files/v${CMAKE_VERSION_A}/cmake-${CMAKE_VERSION_B}-Linux-x86_64.sh -RUN mkdir /opt/cmake -RUN chmod +x /cmake-${CMAKE_VERSION_B}-Linux-x86_64.sh -RUN sh ./cmake-${CMAKE_VERSION_B}-Linux-x86_64.sh --prefix=/opt/cmake --skip-license -RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake -RUN cmake --version - -RUN git clone -n https://phabricator.mitk.org/source/mitk.git mitk-src && cd mitk-src && git checkout $MITK_HASH \ +RUN wget https://cmake.org/files/v${CMAKE_VERSION_A}/cmake-${CMAKE_VERSION_B}-Linux-x86_64.sh \ + && mkdir /opt/cmake \ + && chmod +x cmake-${CMAKE_VERSION_B}-Linux-x86_64.sh \ + && sh ./cmake-${CMAKE_VERSION_B}-Linux-x86_64.sh --prefix=/opt/cmake --skip-license \ + && ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake \ + && cmake --version + +ENV MITK_HASHHASH T25826-RadiomicsGUIUpdate + +RUN git clone -n https://phabricator.mitk.org/source/mitk.git mitk-src && cd mitk-src && git checkout $MITK_HASHHASH \ && cd /opt/mitk-bin \ && cmake \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DQt5_DIR:PATH=/qt/${QT_VERSION_B}/gcc_64/lib/cmake/Qt5/ \ - -DMITK_USE_BLUEBERRY:BOOL=OFF \ + -DMITK_USE_BLUEBERRY:BOOL=ON \ -DMITK_USE_CTK:BOOL=ON \ + -DMITK_USE_Qt5:BOOL=ON \ -DMITK_USE_Vigra:BOOL=ON \ -DMITK_USE_HDF5:BOOL=ON \ -DMITK_USE_OpenCV:BOOL=ON \ -DBUILD_TESTING:BOOL=OFF \ -DMITK_USE_SWIG:BOOL=ON \ -DMITK_USE_MatchPoint=ON\ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_INSTALL_PREFIX=/opt/install \ + -DGIT_EXECUTABLE:PATH=/usr/bin/git \ ../mitk-src \ - && make -j"$(nproc)" MITK-Configure \ - && cd MITK-build \ + && make -j"$(nproc)" MITK-Configure + +RUN cd mitk-bin/MITK-build \ && cmake \ -DBUILD_ClassificationMiniApps:Bool=ON . \ -DBUILD_BasicImageProcessingMiniApps:Bool=ON . \ + -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5m \ + -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m \ + -DPYTHON_LIBRARY:PATH=/usr/lib/x86_64-linux-gnu/libpython3.5m.so \ -DWRAP_PYTHON=ON . \ && make -j"$(nproc)" \ && make dist \ && ldd /opt/mitk-bin/MITK-build/bin/MitkFileConverter | awk 'BEGIN{ORS=" "}$1~/^\//{print $1}$3~/^\//{print $3}' | xargs -i -n 1 -d ' ' cp {} /opt/bin \ && cp /opt/mitk-bin/MITK-build/bin/MitkFileConverter /opt/bin RUN cd /opt/bin/ && patchelf --set-rpath /opt/bin/ MitkFileConverter #&& cd /opt/ \ #&& rm -rf /opt/mitk-* ENV LD_LIBRARY_PATH /opt/bin/ ENV INPUTDIR=/input ENV OUTPUTDIR=/output ENV CONVERTFROM=dcm ENV CONVERTTO=nrrd ENV FILECONVERTER=/opt/mitk-bin/MITK-build/bin - COPY mitk_fileconverter.sh /mitk_fileconverter.sh - ENTRYPOINT ["/bin/bash", "/mitk_fileconverter.sh"] diff --git a/Wrapping/Python/PackageUtility/UbuntuPackageDocker/files/qt-noninteractive.qs b/Wrapping/Python/PackageUtility/UbuntuPackageDocker/files/qt-noninteractive.qs index 6c6bfb7f87..d2564f41ad 100644 --- a/Wrapping/Python/PackageUtility/UbuntuPackageDocker/files/qt-noninteractive.qs +++ b/Wrapping/Python/PackageUtility/UbuntuPackageDocker/files/qt-noninteractive.qs @@ -1,80 +1,83 @@ function Controller() { installer.autoRejectMessageBoxes(); installer.installationFinished.connect(function() { gui.clickButton(buttons.NextButton); }) } Controller.prototype.WelcomePageCallback = function() { - gui.clickButton(buttons.NextButton, 3000); + gui.clickButton(buttons.NextButton, 510000); } Controller.prototype.CredentialsPageCallback = function() { gui.clickButton(buttons.NextButton); } Controller.prototype.IntroductionPageCallback = function() { gui.clickButton(buttons.NextButton); } Controller.prototype.TargetDirectoryPageCallback = function() { gui.currentPageWidget().TargetDirectoryLineEdit.setText("/qt"); gui.clickButton(buttons.NextButton); } Controller.prototype.ComponentSelectionPageCallback = function() { var widget = gui.currentPageWidget(); widget.selectAll(); - widget.deselectComponent('qt.594.src'); + widget.deselectComponent('qt.5112.src'); + widget.deselectComponent('qt.qt5.5112.qtvirtualkeyboard'); + widget.deselectComponent('qt.qt5.5112.android_x86'); + // widget.deselectAll(); // widget.selectComponent("qt.594.gcc_64") // // widget.selectComponent("qt.594.doc") // // widget.selectComponent("qt.594.examples") // widget.selectComponent("qt.594.qtcharts") // widget.selectComponent("qt.594.qtcharts.gcc_64") // widget.selectComponent("qt.594.qtdatavis3d") // widget.selectComponent("qt.594.qtdatavis3d.gcc_64") // widget.selectComponent("qt.594.qtnetworkauth") // widget.selectComponent("qt.594.qtnetworkauth.gcc_64") // widget.selectComponent("qt.594.qtpurchasing") // widget.selectComponent("qt.594.qtpurchasing.gcc_64") // widget.selectComponent("qt.594.qtremoteobjects") // widget.selectComponent("qt.594.qtremoteobjects.gcc_64") // widget.selectComponent("qt.594.qtscript") // widget.selectComponent("qt.594.qtspeech") // widget.selectComponent("qt.594.qtspeech.gcc_64") // widget.selectComponent("qt.594.qtvirtualkeyboard") // widget.selectComponent("qt.594.qtvirtualkeyboard.gcc_64") // widget.selectComponent("qt.594.qtwebengine") // widget.selectComponent("qt.594.qtwebengine.gcc_64") // // widget.selectComponent("qt.594.src") // widget.selectComponent("qt.tools.qtcreator") gui.clickButton(buttons.NextButton); } Controller.prototype.LicenseAgreementPageCallback = function() { gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); gui.clickButton(buttons.NextButton); } Controller.prototype.StartMenuDirectoryPageCallback = function() { gui.clickButton(buttons.NextButton); } Controller.prototype.ReadyForInstallationPageCallback = function() { gui.clickButton(buttons.NextButton); } Controller.prototype.FinishedPageCallback = function() { var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) { checkBoxForm.launchQtCreatorCheckBox.checked = false; } gui.clickButton(buttons.FinishButton); }