From 25d451d87046a1cfbf7ac3cd47c2303fd29a22c5 Mon Sep 17 00:00:00 2001 From: Suchinton Date: Sun, 16 Jun 2024 23:45:07 +0530 Subject: [PATCH] Update Dockerfile for PyQt6 Compatibility - Update packages required to run PyQt6 apps in Debian base. - Update set up script to compile resources. - Use Python venv to resolve requirements to avoid native package conflicts. Bug-AGL: SPEC-5161 Change-Id: I23f0c91e106c863855a4bbb763957e88d6d136e4 Signed-off-by: Suchinton --- docker/entrypoint.sh | 1 + docker/install_packages.sh | 7 +++---- docker/set_up_agl-demo-control-panel.sh | 10 ++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 82da5c3..d64e285 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -3,4 +3,5 @@ set -x cd /opt/agl-demo-control-panel +source test/bin/activate QT_QPA_PLATFORM="vnc:size=1920x1080" python3 -u main.py \ No newline at end of file diff --git a/docker/install_packages.sh b/docker/install_packages.sh index 24b4b93..422d3ac 100755 --- a/docker/install_packages.sh +++ b/docker/install_packages.sh @@ -19,10 +19,9 @@ apt-get install --yes \ # Install AGL Demo Control Panel dependencies apt-get install --yes \ python3-pip \ - python3-pyqt5 \ - python3-qtpy \ - pyqt5-dev-tools \ - python3-pyqt5.qtsvg + python3-venv \ + python3-pyqt6.sip \ + qt6-base-dev # Set bash as default shell echo "dash dash/sh boolean false" | debconf-set-selections - && dpkg-reconfigure dash diff --git a/docker/set_up_agl-demo-control-panel.sh b/docker/set_up_agl-demo-control-panel.sh index 977c8ea..4ce8226 100755 --- a/docker/set_up_agl-demo-control-panel.sh +++ b/docker/set_up_agl-demo-control-panel.sh @@ -9,9 +9,7 @@ cd /opt http_proxy="" https_proxy="" git clone "https://gerrit.automotivelinux.org/gerrit/src/agl-demo-control-panel" cd agl-demo-control-panel -# We do not need to install all the requirements. -cp requirements.txt requirements_small.txt -sed -i 's/pyqt5/#pyqt5/g' requirements_small.txt -cat requirements_small.txt -pip3 install --break-system-packages -r requirements_small.txt -pyrcc5 assets/res.qrc -o res_rc.py \ No newline at end of file +python3 -m venv test +source test/bin/activate +pip3 install -r requirements.txt +pyside6-rcc assets/res.qrc -o res_rc.py \ No newline at end of file -- 2.16.6