Horje
acess nvidia from docker compose Code Example
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]
acess nvidia from docker compose

test_1  | 2021-01-23 11:02:46.500189: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/device:GPU:0 with 1624 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1050, pci bus id: 0000:01:00.0, compute capability: 6.1)





Python

Related
ANSHUL Code Example ANSHUL Code Example
perfect numbers python Code Example perfect numbers python Code Example
error popup in django not visible Code Example error popup in django not visible Code Example
how to leave some parameters in python and let the value be anything Code Example how to leave some parameters in python and let the value be anything Code Example
how to export data from mongodb python Code Example how to export data from mongodb python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8