this is my docker-compose.yaml:
version: '2.3'
services:
nvidia-smi-test:
runtime: nvidia
image: nvidia/cuda:9.0-base
environment:
- NVIDIA_VISIBLE_DEVICES=all
when I run docker-compose up
it will appear:
ERROR: The Compose file './docker-compose.yaml' is invalid because:
Unsupported config option for services.nvidia-smi-test: 'runtime'
but if I don't use docker-compose just use command docker run --runtime=nvidia nvidia/cuda:9.0-base nvidia-smi
there is no error , I don't know exactly what went wrong。Below is version of docker and docker-compose:
Docker version 19.03.5, build 633a0ea838
docker-compose version 1.17.0, build ac53b73
I would be very grateful if everyone could make some comments!
I found the problem, this is because the docker-compose version is not right, Docker Compose must be version 1.19.0 or higher.
I just uninstall the docker-compose (version 1.17.0) and install docker-compose(version 1.21.2) everything goes well!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.