From ca1063ec3ad803d0625095da6140e45bd4990403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=BBebrak?= Date: Tue, 26 Aug 2025 14:24:15 +0200 Subject: [PATCH 1/2] Compile python stdlib so __pycache__ will be already available --- Dockerfile.python_runtime | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile.python_runtime b/Dockerfile.python_runtime index aec7fcd..70dfbc7 100644 --- a/Dockerfile.python_runtime +++ b/Dockerfile.python_runtime @@ -127,4 +127,6 @@ RUN ln -sf /bin/bash /bin/sh && \ /packages_to_install && \ popd - +# Compile so __pycache__ will be already created for standard Python modules +# Will work similar as e.g. `python -m compileall /urs/lib/python3.12` but is more flexible +RUN python3 -c "import sysconfig, compileall; compileall.compile_dir(sysconfig.get_path('stdlib'))" -- GitLab From e104ddcae2c82aa68919432a2a25ef3087577009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=BBebrak?= Date: Tue, 26 Aug 2025 14:26:00 +0200 Subject: [PATCH 2/2] Bump PYTHON_RUNTIME_VERSION --- docker-bake.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 5bfea1d..1230a8b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -17,7 +17,7 @@ variable "PYTHON_VERSION" { } variable "PYTHON_RUNTIME_VERSION" { - default = "3.12-u24.04" + default = "3.12-u24.04-1" } variable "PAAS_PSQL_VERSION" { -- GitLab