Submitting Podman jobs to LSF

Use the Podman application profiles or queues to submit Podman jobs to LSF.

About this task

The following job submission (bsub) options are not supported for container jobs: -E, -Ep.

Procedure

  1. Submit a job to a Podman application profile or queue.
    • Use the bsub -app option to submit a job to a Podman application profile (that is, an application profile with a specified value for the CONTAINER parameter).

      For example, if CONTAINER is defined in the podmanapp application profile, run the following command to submit a Podman job:

      bsub -app podmanapp ./myjob.sh

    • Use the bsub -q option to submit a job to a Podman queue (that is, a queue with a specified value for the CONTAINER parameter).

      For example, if CONTAINER is defined in the podmanq queue, run the following command to submit a Podman job:

      bsub -q podmanq ./myjob.sh

    If you specify both the application profile and the queue in the same job submission, the CONTAINER and EXEC_DRIVER parameter settings in the application profile take precedence over the same parameter settings in the queue.

    For example, if you submit a job with the following command, the parameters in the podmanapp application profile override the corresponding parameters in the podmanq queue:

    bsub -app podmanapp -q podmanq ./myjob.sh

  2. If users are allowed to specify image names for Podman container jobs at job submission time (that is, if the $LSB_CONTAINER_IMAGE environment variable is used as the image name when specifying the image keyword), set the LSB_CONTAINER_IMAGE environment variable at job submission time to specify the Podman image name.

    Specify a container image name (such as centos) at the job submission time by setting the LSB_CONTAINER_IMAGE environment using one of the following methods:

    • Specify the LSB_CONTAINER_IMAGE environment variable according to your shell environment. For example, to specify the Podman image named centos, set the environment variable as follows:
      • In csh or tcsh:

        setenv LSB_CONTAINER_IMAGE centos

      • In sh, ksh, or bash:

        export LSB_CONTAINER_IMAGE=centos

    • Use the bsub -env option. For example, to specify the Podman image named centos

      bsub -env LSB_CONTAINER_IMAGE=centos -app podmanapp a.out -in in.dat -out out.dat

    • Use an esub script to set the LSB_CONTAINER_IMAGE environment variable, then call the esub with the bsub command:
      For example, create an esub.podman script in the $LSF_SERVERDIR directory with the following contents:
      #!/bin/sh
      exec 1>&2
      echo "LSB_CONTAINER_IMAGE=\"$1\"" >> $LSB_SUB_MODIFY_ENVFILE

      Submit a job to call the esub.podman script by running the following command:

      bsub -a "docker(centos)" -app podmanapp a.out -in in.dat -out out.dat