davidADSP / Generative_Deep_Learning_2nd_Edition

The official code repository for the second edition of the O'Reilly book Generative Deep Learning: Teaching Machines to Paint, Write, Compose and Play.

Home Page:https://www.oreilly.com/library/view/generative-deep-learning/9781098134174/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker issue

ShungJhon opened this issue · comments

I've built the docker image successfully. However, when using docker-compose -f docker-compose-gpu.yml up, it returns: Starting generative_deep_learning_2nd_edition_app_1 ... error

ERROR: for generative_deep_learning_2nd_edition_app_1 Cannot start service app: could not select device driver "nvidia" with capabilities: [[gpu]]

ERROR: for app Cannot start service app: could not select device driver "nvidia" with capabilities: [[gpu]]

Does you device have a GPU set up? Are you Windows, Mac or Linux?

It's Ubuntu 20.04 and with a GPU with cuda 11.4. @davidADSP

Do you have NVIDIA Docker installed?
https://github.com/NVIDIA/nvidia-docker

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo systemctl restart docker

docker run --rm --gpus all nvidia/cuda:11.4-base nvidia-smi

If you see the output from nvidia-smi displaying information about your GPU, then you know the GPU is working correctly.