python3
Rev | Line | |
---|
[916] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | set -e -u
|
---|
| 4 |
|
---|
| 5 | scriptdir=`dirname $0`
|
---|
| 6 | scriptdir=`cd "${scriptdir}" && pwd`
|
---|
| 7 |
|
---|
[939] | 8 | docker build -t mlxwinebuild-py3-base "${scriptdir}/context"
|
---|
[916] | 9 |
|
---|
| 10 | if test -z "${XAUTHORITY:-}"; then
|
---|
| 11 | XAUTHORITY="${HOME}/.Xauthority"
|
---|
| 12 | fi
|
---|
| 13 |
|
---|
[939] | 14 | docker run -it --name mlxwinebuildinit -v /tmp/.X11-unix:/tmp/.X11-unix -v "${XAUTHORITY}":/root/.Xauthority -v /usr/lib/x86_64-linux-gnu/vdpau:/usr/lib/x86_64-linux-gnu/vdpau --device /dev/nvidiactl --device /dev/nvidia0 --security-opt=apparmor:unconfined --env DISPLAY mlxwinebuild-py3-base initialize
|
---|
[916] | 15 |
|
---|
| 16 | echo "Committing new image..."
|
---|
| 17 |
|
---|
[939] | 18 | docker commit --change='CMD ["bash"]' mlxwinebuildinit mlxwinebuild-py3
|
---|
[916] | 19 |
|
---|
| 20 | echo "Removing container..."
|
---|
| 21 | docker rm mlxwinebuildinit
|
---|
| 22 |
|
---|
| 23 | echo "Done."
|
---|
Note:
See
TracBrowser
for help on using the repository browser.