Skip to content

Commit 1a97136

Browse files
committed
fix(docker): python bytecode compilation
- we were seeing some issues when building the uboot containers with bytecode compilation, especially on Ubuntu Noble - apparently this is common problem - there are multiple possible workarounds, but I opted for skipping the automatic bytecode compilation and invoking it manually Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
1 parent 5f29316 commit 1a97136

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/uboot/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ ENV VERIFICATION_TEST_UBOOT_VERSION=v${UBOOT_VERSION}
1818

1919
ENV DEBIAN_FRONTEND=noninteractive
2020

21+
# Ubuntu Noble has issues with Python bytecode compilation
22+
# Disable automatic .pyc compilation during install, and later run it manually
23+
ENV DEB_PYTHON_INSTALL_LAYOUT=deb
24+
2125
RUN apt-get update && \
2226
apt-get install -y --no-install-recommends \
2327
bc \
@@ -62,6 +66,7 @@ RUN apt-get update && \
6266
python3-virtualenv \
6367
swig \
6468
uuid-dev \
69+
&& python3 -m compileall /usr/lib/python3/dist-packages \
6570
&& \
6671
if [ "${TARGETARCH}" = 'amd64' ]; then \
6772
apt-get install -y --no-install-recommends \

0 commit comments

Comments
 (0)