lithops-cloud / lithops

A multi-cloud framework for big data analytics and embarrassingly parallel jobs, that provides an universal API for building parallel applications in the cloud ☁️🚀
http://lithops.cloud
Apache License 2.0
317 stars 105 forks source link

Python 3.13 support for IBM Cloud Code Engine backend #1404

Open rmey opened 2 days ago

rmey commented 2 days ago

To be able to use Python 3.13 with IBM Cloud Code Engine backend I modified code-engine.py to use bookworm as base-image and not slim-buster, which did not work because there is no standard docker container matching the python 3.13 tag for that combination.

dockerfile = "Dockefile.default-ce-runtime"
        with open(dockerfile, 'w') as f:
            #f.write(f"FROM python:{utils.CURRENT_PY_VERSION}-slim-buster\n")
            f.write(f"FROM python:{utils.CURRENT_PY_VERSION}-bookworm\n")
            f.write(config.DOCKERFILE_DEFAULT) 

It would be great to use some external templates building the Docker File instead doing it in the source code and to have the template customisable by the user.

JosepSampe commented 2 days ago

Hi @rmey, this code was added to simplify the setup process for new users, primarily for "hello-world" scenarios. However, you're correct that the hardcoded "buster" version is outdated with newer Python versions. I’ll check into updating it.

The correct approach for advanced users is to navigate to the runtimes folder, where we provide templates and instructions for customizing your Dockerfiles as needed.

rmey commented 2 days ago

Thank you for the clarification I will build a custom runtime as you described @JosepSampe.