Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: More robust Python version mismatch handling #662

Closed
wants to merge 5 commits into from

Conversation

dleviminzi
Copy link
Collaborator

@dleviminzi dleviminzi commented Oct 27, 2024

The basis of my work in this PR was trying to use this custom base image: docker.io/huanjason/scikit-learn:latest. When using that base image, our attempt at installing the requested python version will fail. In that situation, I believe it makes sense to report it to the user and fallback to the system's default python version. The alternative is failing completely and effectively giving up on running that base image.

I also included a bit of work to make it possible to use arm runners locally. This just makes local development easier as we use the same architecture for the worker and runner. Without this change, for images with an arm version available, the worker will pull that version and it will not run.

Below is an example application with the custom base image mentioned above:

from beta9 import Image, endpoint


@endpoint(
    image=Image(
        python_version="python3.10",
        base_image="docker.io/huanjason/scikit-learn:latest",
    )
)
def handler():
    import sklearn

    return sklearn.__version__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant