Search
 
SCRIPT & CODE EXAMPLE
 

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]
Comment

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)

Comment

PREVIOUS NEXT
Code Example
Python :: tf.squeeze() 
Python :: python play mp3 in background 
Python :: python playsound stop 
Python :: python flask replit 
Python :: custom 404 page flask 
Python :: get video length python 
Python :: ctrl c selenium python 
Python :: get all file names in a folder python 
Python :: why when I merge my label cluster with my dataframe i get more row 
Python :: how to rotate the x label for subplot 
Python :: how to add two different times in python 
Python :: how to see the functions of a library in python 
Python :: nodemon python 
Python :: virtualenv with specific python version 
Python :: pandas df remove index 
Python :: generate openai schema 
Python :: python method to filter vowels in a string 
Python :: python date get day 
Python :: get object attributes python 
Python :: remove all files in a directory mac 
Python :: how to split a list to 1000 items python 
Python :: printing with colors 
Python :: python moving average of list 
Python :: getpass 
Python :: python extract name out of mail 
Python :: pad zeros to a string python 
Python :: Need Clang = 7 to compile Filament from source 
Python :: fruit shop using list in python 
Python :: draw pixel by pixel python 
Python :: group consecutive numbers in list python 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =