Skip to content

Commit 9684fbd

Browse files
authored
[Code Engine] Allow to build the default runtime with Python 3.13 (#1415)
1 parent 59efd2d commit 9684fbd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- [Standalone] Fixed an issue causing workers to stop prematurely in Consume mode
1313
- [Invoker] Reduced the number of threads used in the async FaaS Invoker
1414
- [Monitoring] Fixed token bucket issue that prevented generating the correct number of tokens
15+
- [Code Engine] Allow to build the default runtime with Python 3.13
1516

1617

1718
## [v3.5.1]

lithops/serverless/backends/code_engine/code_engine.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,10 @@ def _build_default_runtime(self, default_runtime_img_name):
282282
"""
283283
# Build default runtime using local dokcer
284284
dockerfile = "Dockefile.default-ce-runtime"
285+
python_version = utils.CURRENT_PY_VERSION
286+
base_image = "slim-buster" if int(python_version.split('.')[1]) < 13 else "bookworm"
285287
with open(dockerfile, 'w') as f:
286-
f.write(f"FROM python:{utils.CURRENT_PY_VERSION}-slim-buster\n")
288+
f.write(f"FROM python:{python_version}-{base_image}\n")
287289
f.write(config.DOCKERFILE_DEFAULT)
288290
try:
289291
self.build_runtime(default_runtime_img_name, dockerfile)

0 commit comments

Comments
 (0)