Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

acess nvidia from docker compose

# Add the following line to docker-compose

services:
  test:
    image: tensorflow/tensorflow:latest-gpu
    command: python -c "import tensorflow as tf;tf.test.gpu_device_name()"
    deploy:
      resources:
        reservations:
          devices:
            - capabilities: [gpu]
 
PREVIOUS NEXT
Tagged: #acess #nvidia #docker #compose
ADD COMMENT
Topic
Name
1+5 =