Repository navigation
[ci] Configure docker for Vulkan on NVIDIA and use it in Kokoro - #2484
Conversation
This commit adds a Dockerfile for packing the NVIDIA driver and Vulkan SDK inside a docker image and redirects the CMake tests to use this docker image to enable testing Vulkan HAL backend.
|
Note that this is expected to fail given that we need to install the Vulkan driver and SDK on the GCP instance behind Kokoro, push the docker image to iree-oss. After that, there is still a failing Vulkan test that need to be fixed. |
It looks like Kokoro's Docker version is probably |
Updating the Kokoro VM image is a PITA, but may be necessary here :-/ |
|
Yeah from what I can tell using Docker >= 19.03 is required: https://github.com/NVIDIA/nvidia-docker#quickstart. The world around GPUs can be quite fragile so I'd suggest we go with the version bump instead of trying to figure out ways to solve it by ourselves. ;-P I'm a bit confused here: I thought Kokoro is just a coordinator for distributing jobs to those workers in GCP and the real Docker containers are run by GCP instances? I've tried setting up some toy GCP instances and install the newest Docker following https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04. It works there. I'd assume we can also use the same package source there and update to the newest version? But I might miss something here. |
|
Blocked by #2500. |
Yeah the issue is that Kokoro has some provided VM images that have the software necessary for Kokoro. In the past we had to use custom images forking from those that added any new required software. Updating those is a PITA. They're not well maintained at all and are basically an image frozen with the software at the point that the team gave up on trying to provide an image that had everything that everyone needed. Past attempts to update them have sometimes resulted in mysterious errors. Like when we tried to upgrade the Python version and that somehow resulted in the build directory getting deleted halfway through the build (#1346). With the move to docker, we have all the dependencies we need installed in the container instead which means we're back on the standard Kokoro images. It looks like this will actually require an image change. Not the end of the world. Just kind of unfortunate. I'll have to restore the documentation page on how to update these images |
|
Oh I see. Thanks for the explanation! Gah, that is painful. |
|
Note I added a couple commits here 55bccf5 makes these scripts use the latest tag so we can test them out without pushing something with the prod tag. It should be dropped before submitting. I also updated the Python script that builds and pushes the docker images to include this one because I had to do that anyway to push a new image for testing |
|
Test invocation is at https://source.cloud.google.com/results/invocations/2bae146f-c58f-4f51-9b53-c86a1743a4ac/targets (still running right now). |
GMNGeoffrey
left a comment
There was a problem hiding this comment.
Please switch the docker tag back to "prod" when testing is complete.
| ARG VULKAN_SDK_VERSION=1.2.141 | ||
|
|
||
| # Disable apt-key parse waring. | ||
| ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 |
There was a problem hiding this comment.
Is this actually necessary? I think that's only required if you're parsing the apt-key output, which we're not here
There was a problem hiding this comment.
Yeah otherwise I see "Warning: apt-key output should not be parsed (stdout is not a terminal)" due to adding key from lunarg.
There was a problem hiding this comment.
Weird... when I run the command locally I don't see that error, but I do when building the docker container. I guess despite what the warning says, what it's actually complaining about is usage within a script? I'm worried that the warning is there for a reason:
From the apt-key docs:
the programmatic usage (especially in package maintainer scripts!) is strongly discouraged.
It would be nice to figure out how to avoid this. Maybe it's better to to not use apt, for instance?
Anyway, let's not block on this.
All the actual builds passed and then this...
Probably another issue with the image. sigh If you want to remove the |
|
Done. I think we just need to tag a docker image as |
| ARG VULKAN_SDK_VERSION=1.2.141 | ||
|
|
||
| # Disable apt-key parse waring. | ||
| ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 |
There was a problem hiding this comment.
Weird... when I run the command locally I don't see that error, but I do when building the docker container. I guess despite what the warning says, what it's actually complaining about is usage within a script? I'm worried that the warning is there for a reason:
From the apt-key docs:
the programmatic usage (especially in package maintainer scripts!) is strongly discouraged.
It would be nice to figure out how to avoid this. Maybe it's better to to not use apt, for instance?
Anyway, let's not block on this.
| ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 | ||
|
|
||
| # Disable prompt during keyboard configuration. | ||
| ENV DEBIAN_FRONTEND=noninteractive |
There was a problem hiding this comment.
I wonder if this might be what's causing the sudo problems? I just tried without it and seems to work fine?
There was a problem hiding this comment.
It seems.. quite weird this can cause sudo issues. I was having problems when building the docker image without this. But maybe something gotten changed along the way so this is not needed anymore. Feel free to remove it if that's the case.
There was a problem hiding this comment.
Or maybe move this to prefix the following RUN command so it's scoped?
This commit adds a Dockerfile for packing the NVIDIA driver and
Vulkan SDK inside a docker image and redirects the CMake tests
to use this docker image to enable testing Vulkan HAL backend.