gitlab-ci服务中的Nvidia运行时

时间:2019-12-16 20:26:23

标签: gitlab-ci nvidia nvidia-docker

我有一个加载docker daemon docker的服务,并且我想在该服务中利用nvidia gpus,我创建了一个以dockerd为入口点的映像,并安装了nvidia cuda驱动程序,但是当我尝试部署应用程序进行测试时目的是我在服务映像中遇到与nvidia驱动程序有关的错误

docker:来自守护程序的错误响应:OCI运行时创建失败:container_linux.go:346:导致启动容器进程“ process_linux.go:449:容器初始化导致” process_linux.go:432:运行prestart钩子1导致\“错误运行挂钩:退出状态1,stdout:,stderr:nvidia-container-cli:初始化错误:驱动程序错误:无法处理请求\ n \”””:未知。

#image: chatzich/dinvidia
stages:
  - test
  - package

before_script:
  - echo "Before script section"

after_script:
  - echo "After script section"


test:
  image: chatzich/dinvidia
  services:
    - name: chatzich/dinvidia
      alias: dinvidia
  stage: build
  variables:
    DOCKER_HOST: tcp://dinvidia:2375
    DOCKER_DRIVER: overlay2
    DOCKER_TLS_CERTDIR: ""

  tags:
    - gpu

  script:
    # Build the production image
    - echo "Build stage script"
    - ldconfig -p | grep nvidia
    - docker --version
    - docker run --rm --runtime=nvidia nvidia/cuda ldconfig -p | grep nvidia


  stage: test

package:
  stage: package
  script:
    # Build the production image
    - echo "Package stage script"

0 个答案:

没有答案