diff --git a/Dockerfile.python_runtime b/Dockerfile.python_runtime index aec7fcd8528a6b149334ce61f66b3b992a32c10a..70dfbc7a473de7d1fd4513882da36bd8897cad54 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'))" diff --git a/docker-bake.hcl b/docker-bake.hcl index 5bfea1d0f051b54e6605f93858b31dccd8f3278a..1230a8b048ed4c23e7e82516bdf9f97091d1a4bd 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" {