Created
January 28, 2022 09:51
-
-
Save carlthome/138045aae02bde7cabeedfa2605890c4 to your computer and use it in GitHub Desktop.
Check that a host system can use NVIDIA GPUs inside containers. Usage: `docker-compose run test-gpu`
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
version: "3" | |
services: | |
test-gpu: | |
image: tensorflow/tensorflow:latest-gpu | |
command: python -c "import tensorflow as tf; assert tf.test.is_gpu_available()" | |
deploy: | |
resources: | |
reservations: | |
devices: | |
- driver: nvidia | |
capabilities: [gpu] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment