Skip to content

Compute worker installation with Podman

dtuantran edited this page Dec 9, 2022 · 25 revisions

Here is the specification for compute worker installation by using Podman.

Firstly, I’m presenting the guide, how to install the compute worker with Podman for two cases CPU and GPU compute worker. This could help you understand more about the requirements later.

Secondly, there are the packages, configurations for VM, the changes needed in the project where “docker” is hard coded and the requirements for the images.

Finally, there are other places where “docker” term appears in the code. It couldn’t affect the correct functioning; however, it could make developer / admin confused after switching to Podman.

Table of Contents

  1. Compute worker installation
  • For CPU compute worker
  • For GPU compute worker
  1. Requirements
  • For VM
  • For the code
  • For the container images
  1. Other suggestions

1. Compute worker installation

We need to install Podman on the VM. We use Debian based OS, like Ubuntu. Ubuntu is recommended, because it has Nvidia driver support better.

sudo apt install podman

Then configure where Podman downloading the images to the docker hub, by adding this line belowing into /etc/containers/registries.conf

unqualified-search-registries = ["docker.io"]

For CPU case

Create the .env file in order to add the compute worker into a queue (we use the default queue) :

BROKER_URL=pyamqp://<login>:<password>@www.codabench.org:5672 
HOST_DIRECTORY=/codabench/storage
BROKER_USE_SSL=true

Run the compute worker :

podman run -d \ 
    -v /codabench/storage:/codabench \ 
    -v /run/user/1001/podman/podman.sock:/run/user/1001/podman/podman.sock \ # podman socket of the user, this example uses userid 1001
    --env-file .env \ 
    --name compute_worker \ 
    --restart unless-stopped \ 
    --log-opt max-size=50m \ 
    --log-opt max-file=3 \ 
    codalab/competitions-v2-compute-worker:latest

For GPU case

2. Requirements

For VM

Changes needed in the code

For container images

3. Other suggestions

Clone this wiki locally