Last active
September 4, 2023 15:52
-
-
Save CarlosUvaSilva/98e43f7abac0a17fc6fa7c7bac784067 to your computer and use it in GitHub Desktop.
Allow running multiple GPU "enabled" containers using AWS ECS services
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 | |
(sudo grep -q ^OPTIONS=\"--default-runtime /etc/sysconfig/docker && echo '/etc/sysconfig/docker needs no changes') || \ | |
(sudo touch /home/ec2-user/test.txt && \ | |
sudo sed -i 's/^OPTIONS="/OPTIONS="--default-runtime nvidia /' /etc/sysconfig/docker && \ | |
echo '/etc/sysconfig/docker updated to have nvidia runtime as default' && \ | |
sudo systemctl restart docker && echo 'Restarted docker') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment