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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With