Re: Autopgktest with podman+ROCm

2025-06-11 Thread Christian Kastner
On 2025-06-10 14:31, PICCA Frederic-Emmanuel wrote:
> Do you know how to customize the podmqn contqiner when using the 
> rocm-podmqn-creqte script ?

Since it's just a wrapper around autopkgtest-build-podman, you can user
the latter's --post-command option to run a shell command in the image.

And as the result of the build is a simple container image, you can use
it as the base for other images in a Dockerfile/Containerfile.

Best,
Christian



Re: Autopgktest with podman+ROCm

2025-06-10 Thread PICCA Frederic-Emmanuel
> And this works, right?

It work but we need to customize the chroot in order to set the http_proxy.

Do you know how to customize the podmqn contqiner when using the 
rocm-podmqn-creqte script ?

> I don't quite follow. You say the test passes, so I guess you mean
> sbuild and autopkgtest with the regular 'podman' backend instead of
> 'podman+rocm'?

the only difference  between something wotking and not working is the 
existenqce of the https_proxy in the container.
Because we need an internet acces in order to download the test dataset.

> You can start a container interactively to play around and see what works:
> 
>  # regular backend
>  $ podman run --rm -it debian:unstable.img
> 
>  # backend which includes AMD GPUs
>  # rocm-podman-run --rm -it debian:unstable.img

thanks

Fred



Re: Autopgktest with podman+ROCm

2025-06-09 Thread Christian Kastner
Hi Clement,

On 2025-06-04 17:23, LONGEAC Clement wrote:
> I have implemented podman as follows:
> 
> rocm-podman-create debian:unstable.img
> 
> autopkgtest -B silx -- podman+rocm debian:unstable.img

And this works, right?

> I added in the sbuild config file :
> 
> $autopkgtest_opts = ['--shell-fail', '--apt-upgrade', '--', 
> 'podman+rocm', 'rocm/debian:%r'];
> 
> When I run autopkgtest for the ufo-filters package, where it is necessary to 
> fetch https://plmlab.math.cnrs.fr/tomogroup/ufo-testing.git
> 
> Now when I run an sbuild without the podman+rocm implementation, the test 
> passes, no proxy problem.

I don't quite follow. You say the test passes, so I guess you mean
sbuild and autopkgtest with the regular 'podman' backend instead of
'podman+rocm'?

> But when I run autopkgtest with podman+rocm , I get the following error:
> 
>  Cloning into 'ufo-testing'...
>  fatal: unable to access
>  'https://plmlab.math.cnrs.fr/tomogroup/ufo-testing.git/': Failed to connect 
> to
>  plmlab.math.cnrs.fr port 443 after 135130 ms: Could not connect to server
>  autopkgtest [16:04:12]
>
> My question : How to integrate the http and https part to the chroot 
> used by podman ? 
>   How do I set up the proxy for podman in 
> /etc/environment?

Is this a problem with https and http, or only with https?

You can start a container interactively to play around and see what works:

  # regular backend
  $ podman run --rm -it debian:unstable.img

  # backend which includes AMD GPUs
  # rocm-podman-run --rm -it debian:unstable.img

Best,
Christian



Re: Autopgktest with podman+ROCm

2025-06-04 Thread LONGEAC Clement
Hi Christian,

I have implemented podman as follows:

rocm-podman-create debian:unstable.img

autopkgtest -B silx -- podman+rocm debian:unstable.img

I added in the sbuild config file :

$autopkgtest_opts = ['--shell-fail', '--apt-upgrade', '--', 
'podman+rocm', 'rocm/debian:%r'];

When I run autopkgtest for the ufo-filters package, where it is necessary to 
fetch https://plmlab.math.cnrs.fr/tomogroup/ufo-testing.git

Now when I run an sbuild without the podman+rocm implementation, the test 
passes, no proxy problem.

But when I run autopkgtest with podman+rocm , I get the following error:

 Cloning into 'ufo-testing'...
 fatal: unable to access
 'https://plmlab.math.cnrs.fr/tomogroup/ufo-testing.git/': Failed to connect to
 plmlab.math.cnrs.fr port 443 after 135130 ms: Could not connect to server
 autopkgtest [16:04:12]


As a result, there seems to be a proxy management problem with the command used:

My question : How to integrate the http and https part to the chroot 
used by podman ? 
  How do I set up the proxy for podman in /etc/environment?

Thank you for your attention,

Clément LONGEAC

- Mail original -
De: "Christian Kastner" 
À: "LONGEAC Clement" 
Cc: "debian-science" 
Envoyé: Lundi 2 Juin 2025 23:07:21
Objet: Re: Autopgktest with podman+ROCm

HI Clement,

On 2025-06-02 14:41, LONGEAC Clement wrote:
> # Run rocrand's autopkgtest, passing in only the GPU 
> $ autopkgtest -B rocrand -- podman+rocm --gpu /var/tmp/unstable.img

Note that the podman+rocm backend does not yet support a --gpu argument
for the reasons mentioned in an earlier mail. And the positional
argument should be an image name, not a path.

Your invocation should look something like this:

  $ autopkgtest -B rocrand -- podman+rocm rocm/debian:unstable

> I have configured a schroot for sbuild whose config.pl file is as follows: 

> $autopkgtest_opts = ['--shell-fail', '--apt-upgrade', '--',
> 'podman+rocm', '--init', 'debian:%r'];

You are including an --init argument there. Does your test really need
an init system running?

Not that it shouldn't. It's just unusual; not many tests require it.

> In that case: does the podman need a special schroot?
> 
> Creation of a chroot with rocm-podman-create
> 
> $ rocm-podman-create

Note that this will create an image without an init system.

As per its man page, rocm-podman-create is just a thin wrapper around
autopkgtest-build-podman(1) to which it passes on all arguments it
doesn't consume itself. autopkgtest-build-podman accepts an --init
parameter (more details in the man page).

Therefore, if you really need an init system, you should build the image
with something linke

  $ rocm-podman-create --init=systemd

> Execution of autopkgtest from sbuild
> 
> autopkgtest [13:51:46]: host grades-01.synchrotron-soleil.fr; command
> line: /usr/bin/autopkgtest /home/experiences/instrumentation/picca/
> debian/science-team/ufo-filters_0.17.0.76.g691aa0e+dfsg1-1.dsc /home/
> experiences/instrumentation/picca/debian/science-team/ufo-
> filters_0.17.0.76.g691aa0e+dfsg1-1_amd64.changes --shell-fail --apt-
> upgrade -- podman+rocm --init debian:unstable
> WARNING: dbus-user-session not available, podman will probably not work
> : failure: ['podman', 'run', '--detach=true', '--volume',
> '/tmp/autopkgtest-virt-docker.shared.1h8b9zg_:/tmp/autopkgtest-virt-
> docker.shared.1h8b9zg_', '--device=/dev/dri', '--device=/dev/kfd', '--
> gidmap=0:0:1', '--gidmap=44:1:1', '--gidmap=105:2:1', '--gidmap=1:3:43',
> '--gidmap=45:46:60', '--gidmap=106:107:65429', 'debian:unstable', '/
> sbin/init'] failed (exit status 127, stderr 'Error: crun: executable
> file `/sbin/init` not found: No such file or directory: OCI runtime
> attempted to invoke a command that was not found\n')

See the error message about /sbin/init not found, which is a consequence
of invoking the test backend with --init on an image that wasn't built
with --init.

Best,
Christian



Re: Autopgktest with podman+ROCm

2025-06-02 Thread Christian Kastner
HI Clement,

On 2025-06-02 14:41, LONGEAC Clement wrote:
> # Run rocrand's autopkgtest, passing in only the GPU 
> $ autopkgtest -B rocrand -- podman+rocm --gpu /var/tmp/unstable.img

Note that the podman+rocm backend does not yet support a --gpu argument
for the reasons mentioned in an earlier mail. And the positional
argument should be an image name, not a path.

Your invocation should look something like this:

  $ autopkgtest -B rocrand -- podman+rocm rocm/debian:unstable

> I have configured a schroot for sbuild whose config.pl file is as follows: 

> $autopkgtest_opts = ['--shell-fail', '--apt-upgrade', '--',
> 'podman+rocm', '--init', 'debian:%r'];

You are including an --init argument there. Does your test really need
an init system running?

Not that it shouldn't. It's just unusual; not many tests require it.

> In that case: does the podman need a special schroot?
> 
> Creation of a chroot with rocm-podman-create
> 
> $ rocm-podman-create

Note that this will create an image without an init system.

As per its man page, rocm-podman-create is just a thin wrapper around
autopkgtest-build-podman(1) to which it passes on all arguments it
doesn't consume itself. autopkgtest-build-podman accepts an --init
parameter (more details in the man page).

Therefore, if you really need an init system, you should build the image
with something linke

  $ rocm-podman-create --init=systemd

> Execution of autopkgtest from sbuild
> 
> autopkgtest [13:51:46]: host grades-01.synchrotron-soleil.fr; command
> line: /usr/bin/autopkgtest /home/experiences/instrumentation/picca/
> debian/science-team/ufo-filters_0.17.0.76.g691aa0e+dfsg1-1.dsc /home/
> experiences/instrumentation/picca/debian/science-team/ufo-
> filters_0.17.0.76.g691aa0e+dfsg1-1_amd64.changes --shell-fail --apt-
> upgrade -- podman+rocm --init debian:unstable
> WARNING: dbus-user-session not available, podman will probably not work
> : failure: ['podman', 'run', '--detach=true', '--volume',
> '/tmp/autopkgtest-virt-docker.shared.1h8b9zg_:/tmp/autopkgtest-virt-
> docker.shared.1h8b9zg_', '--device=/dev/dri', '--device=/dev/kfd', '--
> gidmap=0:0:1', '--gidmap=44:1:1', '--gidmap=105:2:1', '--gidmap=1:3:43',
> '--gidmap=45:46:60', '--gidmap=106:107:65429', 'debian:unstable', '/
> sbin/init'] failed (exit status 127, stderr 'Error: crun: executable
> file `/sbin/init` not found: No such file or directory: OCI runtime
> attempted to invoke a command that was not found\n')

See the error message about /sbin/init not found, which is a consequence
of invoking the test backend with --init on an image that wasn't built
with --init.

Best,
Christian