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(ApplicationManager): handle podman connections #1528

Merged

Conversation

axel7083
Copy link
Contributor

@axel7083 axel7083 commented Aug 12, 2024

What does this PR do?

This PR makes the application manager requires a ContainerProviderConnection argument when pulling a recipe. This connection will be propagated to the RecipeManager and the BuilderManager, to respect the connection to use.

This allow us to target a specific connection if multiple exists. For now we keep the existing behaviour of taking the first running.

Screenshot / video of UI

N/A

What issues does this PR fix or reference?

Fixes #1527
Requires for #1462

How to test this PR?

  • unit tests has been provided

Manuallyy

  • Start a recipe, stop, restart
  • assert no problem

@axel7083 axel7083 changed the title feature(ApplicationManager): support multiple podman connections feature(ApplicationManager): handle podman connections Aug 12, 2024
@axel7083 axel7083 marked this pull request as ready for review August 12, 2024 15:16
@axel7083 axel7083 requested review from benoitf, jeffmaury and a team as code owners August 12, 2024 15:16
@axel7083
Copy link
Contributor Author

axel7083 commented Aug 12, 2024

Short demo

This PR does not expose UI, however using the dev tools, we can make some experiments

On my Linux fedora 40, I have a podman machine (qemu), a native and a remote (unix) connection.

image

Inside AI Lab I can open the dev tools and check those connections

image

Let's store them inside a connections variable

Let's start a code generation recipe on the qemu machine

studioClient.requestPullApplication({
    'modelId': 'hf.ibm-granite.granite-8b-code-instruct',
    'recipeId': 'codegeneration',
    connection: connections[2]
});

And now, let's start a text_to_audio recipe on the native connection

studioClient.requestPullApplication({
    'modelId': 'hf.ggerganov.whisper.cpp',
    'recipeId': 'audio_to_text',
    connection: connections[1]
});

Finally we have two pod running on two different machines

image

Let's look at the console

$: podman --connection=podman-machine-default pod ls
POD ID        NAME                              STATUS      CREATED        INFRA ID      # OF CONTAINERS
9634e7b0fabc  pod-whispercpp-app-1723476984746  Running     8 minutes ago  ce88673f9681  3
$: podman pod ls
POD ID        NAME                           STATUS      CREATED        INFRA ID      # OF CONTAINERS
066ece98d4de  pod-codegen-app-1723477339738  Running     2 minutes ago  fb0e0fac6ab4  3

@axel7083 axel7083 marked this pull request as draft August 12, 2024 15:32
@axel7083 axel7083 marked this pull request as ready for review August 12, 2024 15:57
Copy link
Contributor

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
@axel7083 axel7083 force-pushed the feature/application-manager-podman-connections branch from 26c4f3c to 622fb7d Compare August 13, 2024 08:11
@axel7083 axel7083 enabled auto-merge (squash) August 13, 2024 08:14
@axel7083 axel7083 merged commit ce0da6a into containers:main Aug 13, 2024
4 checks passed
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.

Having a podman machine on Linux add Z flag to recipe volume
3 participants