Spent a good part of the day yesterday writing up some neat Docker images to run GPU enabled OpenCL out of. Wasnt too hard to figure out how to get the docker image the correct access to the GPU to enable the GPU acceleration or anything. In fact the tricker part was figuring out how to write the .gitlab-ci.yml file and the respective Dockerfile to be parameterized to minimize work.

Its a cool little trick I used, it basically looks at the branch or tag name to figure out how to tag the docker images. If the branch is develop it is tagged as "aparapi/aparapi-nvidia:git" and does another one as "aparapi/aparapi-amdgpu:git". Similarly if the branch is master then it will be "latest" instead of "git". However if its a tag then it uses the tag in place of it. So when using aparapi version 2.0.0 with amdgpu, and the version revision of the dockerfile, it would look like "aparapi/aparapi-amdgpu:2.0.0-1". This means minimal work for me, when I want to use a new version I just change the aparapi version, and push it to a new tag and it does all the work to compile it.

It even automatically pushes it to docker hub for me!




i am currentkly builing olg in asp.net

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.