Forked from anonymous/amdgpupro_in_container.bash
Created
September 11, 2017 06:28
-
-
Save rms1000watt/225200799eb995cf0784b957427f7e7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
ln -s /usr/lib/x86_64-linux-gnu/amdgpu-pro . | |
ln -s /etc/OpenCL . | |
tar -czvf libs.tar.gz amdgpu-pro/* | |
tar -czvf conf.tar.gz OpenCL/* | |
cat > .dockerignore << EOF | |
OpenCL | |
amdgpu-pro | |
EOF | |
cat > Dockerfile << EOF | |
FROM ubuntu:16.04 | |
ADD libs.tar.gz /usr/lib | |
ADD conf.tar.gz /etc | |
RUN ldconfig /usr/lib /usr/lib/amdgpu-pro | |
CMD ["bash"] | |
EOF | |
docker build -t climage . | |
echo "Finished. Run with:" | |
echo " docker run --device /dev/dri:/dev/dri <extra-params> climage <command>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment