dbcsr icon indicating copy to clipboard operation
dbcsr copied to clipboard

ghi: move ROCm image to our hub.docker.com org

Open dev-zero opened this issue 3 years ago • 13 comments

The ROCm build tests currently uses an image from @shoshijak, we should migrate that to our Docker hub and rebuild/update the image periodically like we do with the others.

Note: the Docker Hub Repo is already there and GHI should have push access, so the only things remaining are:

  • [ ] add job entry in .github/workflows/docker-build-env.yml for the ROCm Docker in tools/docker/Dockerfile.build-env-rocm
  • [ ] change the reference docker repo in .github/workflows/testing-linux.yml

dev-zero avatar Feb 08 '21 08:02 dev-zero

Let me fix this

haampie avatar Feb 09 '21 09:02 haampie

By the way, generally it's fine to use Ubuntu 20.04, but the downside is that you get a very recent libc, so if you decide to run this docker image on Daint with the --mpi flag, you might run into problems when it tries to mount Cray's libmpi.so + deps (which includes old libc).

haampie avatar Feb 09 '21 09:02 haampie

Well, I don't mind upgrading them to 20.04.

But I just discovered another problem: Docker restricted the options in the Free edition of Docker hub, meaning that I can't hand out granular permissions anymore (permissions on existing repos still work). So I had to make the dbcsrbot an owner of the organization, which should allow it to push to:

  • https://hub.docker.com/repository/docker/dbcsr/build-env-rocm-ubuntu-18.04
  • https://hub.docker.com/repository/docker/dbcsr/build-env-rocm-ubuntu-20.04

If it doesn't please let me know, then we have to try something else. Also, I can add you to the Docker Hub organization if needed. We might even start looking for something else anyway since Docker also started to restrict the pull frequency (which may trip the CI) and I don't like handing out elevated permissions to a bot user.

dev-zero avatar Feb 09 '21 09:02 dev-zero

You can also push to github, right?

haampie avatar Feb 09 '21 09:02 haampie

By the way, generally it's fine to use Ubuntu 20.04, but the downside is that you get a very recent libc, so if you decide to run this docker image on Daint with the --mpi flag, you might run into problems when it tries to mount Cray's libmpi.so + deps (which includes old libc).

What's the lowest Ubuntu version that we can use on Daint, 18.04? I also think we should avoid to use new libc...

alazzaro avatar Feb 09 '21 09:02 alazzaro

yes, but there were issues at the beginning with the GH CI integration, if that is fixed we can use the GitHub Packages, but it seems they moved it to the org and is only accessible directly since it's probably deactivated on the CP2K org.

dev-zero avatar Feb 09 '21 09:02 dev-zero

Also, I can add you to the Docker Hub organization if needed

@dev-zero that'd be useful to make CI pass in #432, I'd have to docker push the image once ahead of time (my dockerhub username is stabbles)

haampie avatar Feb 09 '21 10:02 haampie

$ docker run ubuntu:16.04 ldd --version | head -n1
ldd (Ubuntu GLIBC 2.23-0ubuntu11.2) 2.23

$ docker run ubuntu:18.04 ldd --version | head -n1
ldd (Ubuntu GLIBC 2.27-3ubuntu1.2) 2.27

$ docker run ubuntu:20.04 ldd --version | head -n1
ldd (Ubuntu GLIBC 2.31-0ubuntu9.1) 2.31

and

daint105 ~ $ ldd --version | head -n1
ldd (GNU libc) 2.26

I've always used ubuntu 18.04 without any problem, but apparently ubuntu:16.04 is best :/

haampie avatar Feb 09 '21 10:02 haampie

Also, I can add you to the Docker Hub organization if needed

@dev-zero that'd be useful to make CI pass in #432, I'd have to docker push the image once ahead of time (my dockerhub username is stabbles)

done

dev-zero avatar Feb 09 '21 10:02 dev-zero

Forget my previous comment, I see HIP is using 18 (https://github.com/cp2k/dbcsr/tree/develop/tools/docker)

alazzaro avatar Feb 09 '21 10:02 alazzaro

Forget my previous comment, I see HIP is using 18 (https://github.com/cp2k/dbcsr/tree/develop/tools/docker)

I just changed that to ubuntu 20.04 in #432 because the other ubuntu image uses that too and it would be fewer lines to install compilers and libs :sweat_smile:

Let me see how much work it is to move everything to ubuntu 18.04.

haampie avatar Feb 09 '21 10:02 haampie

I'd stick to ubuntu 20.04 for now. There's multiple issues with ubuntu 18.04:

  1. gcc-8 and lcov don't work together when installed with apt; lcov doesn't understand the new coverage format
  2. libmpich.so has a wrong soname and won't work with sarus on daint; not the case on ubuntu 20.04:
    $ docker run ubuntu:18.04 /bin/bash -c 'apt update &> /dev/null  && apt install -y libmpich-dev &> /dev/null && readelf -d /usr/lib/libmpi.so | grep libmpi'
     0x000000000000000e (SONAME)             Library soname: [libmpich.so.0]
    
    it should be libmpich.so.12, and then sarus would know it's abi compatible with cray's libs.

haampie avatar Feb 09 '21 10:02 haampie

Well, 20.04 is fine, of course...

alazzaro avatar Feb 09 '21 10:02 alazzaro