简体   繁体   English

docker-compose:“运行时”不支持的配置选项

[英]docker-compose: Unsupported config option for 'runtime'

Recently, I have reinstalled my Ubuntu 20.04 and I am trying to run my docker-compose.yml using docker-compose up --build .最近,我重新安装了 Ubuntu 20.04,并尝试使用docker-compose.yml docker-compose up --build运行我docker-compose.yml And I am getting following error,我收到以下错误,

ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.test: 'runtime'

And my docker-compose.yml isdocker-compose.yml

version: '3'
                                                                                                       
services:                                                                                              
  test:
    image: nvidia/cuda:11.0-base
    command: nvidia-smi
    runtime: nvidia 

In my previous Ubuntu 20.04 it was working fine, but after new docker installation I am getting this error.在我之前的 Ubuntu 20.04 中它运行良好,但是在新的 docker 安装后我收到了这个错误。 Additionally, I have also installed Nvidia Container Toolkit .此外,我还安装了Nvidia Container Toolkit

Furthermore, the command docker run --rm --runtime=nvidia nvidia/cuda:11.0-base nvidia-smi is also working as expected.此外,命令docker run --rm --runtime=nvidia nvidia/cuda:11.0-base nvidia-smi也按预期工作。

I appreciate any help to solve this problem.我感谢任何帮助解决这个问题。

Thank you.谢谢你。

This is highly version dependent problem.这是高度依赖于版本的问题。

Most of answers are in thread https://github.com/docker/compose/issues/6239 It seems to work on 1.27 as both v2 and v3 compose syntaxes have been merged, but broke on 1.28 and this undocumented madness unfortunately goes on.大多数答案都在线程https://github.com/docker/compose/issues/6239 中它似乎在 1.27 上工作,因为 v2 和 v3 compose 语法已合并,但在 1.28 上崩溃了,不幸的是这种未记录的疯狂仍在继续。

If you expect it to work with docker-compose, than you should probably stick with version that has been known for working with this feature for now.如果您希望它与 docker-compose 一起使用,那么您可能应该坚持使用目前以使用此功能而闻名的版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 docker-compose:服务的配置选项不受支持:“redis” - docker-compose: Unsupported config option for services: 'redis' docker-compose:服务服务不支持的配置选项:'web' - docker-compose : Unsupported config option for services service: 'web' Windows中的docker-compose:服务的不受支持的配置选项:“ web” - docker-compose in windows: Unsupported config option for services: 'web' docker-compose:services.db 不支持的配置选项:“jupyter” - docker-compose: Unsupported config option for services.db: 'jupyter' docker-compose不支持的服务配置 - docker-compose unsupported config for services 相当于docker-compose中的docker选项--config - equivalent of docker option --config in docker-compose docker-compose:撰写文件“...”无效,因为:不支持的配置选项 - docker-compose: Compose file "..." is invalid because: unsupported config options docker-compose 版本包含不受支持的选项:“网络” - docker-compose build contains unsupported option: 'network' 错误:撰写文件“./docker-compose.yaml”无效,因为:services.nvidia-smi-test 的配置选项不受支持:“运行时” - ERROR: The Compose file './docker-compose.yaml' is invalid because: Unsupported config option for services.nvidia-smi-test: 'runtime' docker-compose中的版本不受支持 - Version in docker-compose is unsupported
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM