Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lukaCoding
nvidia-container-runtime
提交
1ac122a9
N
nvidia-container-runtime
项目概览
lukaCoding
/
nvidia-container-runtime
与 Fork 源项目一致
从无法访问的项目Fork
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nvidia-container-runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1ac122a9
编写于
1月 14, 2019
作者:
R
Renaud Gaubert
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add support for 18.09.1
上级
95836f33
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
71 addition
and
4 deletion
+71
-4
runtime/Makefile
runtime/Makefile
+7
-4
runtime/runc/96ec2177ae841256168fcf76954f7177af9446eb/0001-Add-prestart-hook-nvidia-container-runtime-hook-to-t.patch
...dd-prestart-hook-nvidia-container-runtime-hook-to-t.patch
+64
-0
未找到文件。
runtime/Makefile
浏览文件 @
1ac122a9
...
...
@@ -12,22 +12,25 @@ DIST_DIR := $(CURDIR)/../dist
all
:
ubuntu18.04 ubuntu16.04 ubuntu14.04 debian9 debian8 centos7 amzn2 amzn1
ubuntu18.04
:
$(addsuffix -ubuntu18.04
,
18.09.0 18.06.1 18.06.0 18.03.1 17.12.1)
ubuntu18.04
:
$(addsuffix -ubuntu18.04
,
18.09.
1 18.09.
0 18.06.1 18.06.0 18.03.1 17.12.1)
ubuntu16.04
:
$(addsuffix -ubuntu16.04
,
18.09.0 18.06.1 18.06.0 18.03.1 18.03.0 17.12.1 17.12.0 17.09.1 17.09.0 17.06.2 17.03.2 1.13.1 1.12.6)
ubuntu16.04
:
$(addsuffix -ubuntu16.04
,
18.09.
1 18.09.
0 18.06.1 18.06.0 18.03.1 18.03.0 17.12.1 17.12.0 17.09.1 17.09.0 17.06.2 17.03.2 1.13.1 1.12.6)
ubuntu14.04
:
$(addsuffix -ubuntu14.04
,
18.06.1 18.06.0 18.03.1 18.03.0 17.12.1 17.09.1 17.06.2 17.03.2)
debian9
:
$(addsuffix -debian9
,
18.09.0 18.06.1 18.06.0 18.03.1 18.03.0 17.12.1 17.12.0 17.09.1 17.09.0 17.06.2 17.03.2)
debian9
:
$(addsuffix -debian9
,
18.09.
1 18.09.
0 18.06.1 18.06.0 18.03.1 18.03.0 17.12.1 17.12.0 17.09.1 17.09.0 17.06.2 17.03.2)
debian8
:
$(addsuffix -debian8
,
18.06.1 18.06.0 18.03.1 18.03.0 17.12.1 17.09.1 17.06.2)
centos7
:
$(addsuffix -centos7
,
18.09.0 18.06.1 18.06.0 18.03.1 18.03.0 17.12.1 17.12.0 17.09.1 17.09.0 17.06.2 17.03.2 1.13.1 1.12.6)
centos7
:
$(addsuffix -centos7
,
18.09.
1 18.09.
0 18.06.1 18.06.0 18.03.1 18.03.0 17.12.1 17.12.0 17.09.1 17.09.0 17.06.2 17.03.2 1.13.1 1.12.6)
amzn2
:
$(addsuffix -amzn2
,
18.06.1 18.03.1 17.06.2)
amzn1
:
$(addsuffix -amzn1
,
18.06.1 18.03.1 17.12.1 17.09.1 17.06.2 17.03.2)
18.09.1-%-runc
:
echo
"96ec2177ae841256168fcf76954f7177af9446eb"
18.09.0-%-runc
:
echo
"4fc53a81fb7c994640722ac585fa9ca548971871"
...
...
runtime/runc/96ec2177ae841256168fcf76954f7177af9446eb/0001-Add-prestart-hook-nvidia-container-runtime-hook-to-t.patch
0 → 100644
浏览文件 @
1ac122a9
From e2f8af42d9d0f8d7afc236323994a9ebe6bb0c3b Mon Sep 17 00:00:00 2001
From: Felix Abecassis <fabecassis@nvidia.com>
Date: Wed, 3 Jan 2018 11:50:02 -0800
Subject: [PATCH] Add prestart hook nvidia-container-runtime-hook to the config
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
---
utils.go | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/utils.go b/utils.go
index 5165336..5cdd11e 100644
--- a/utils.go
+++ b/utils.go
@@ -3,6 +3,7 @@
package main
import (
"fmt"
"os"
+ "os/exec"
"path/filepath"
"strconv"
"strings"
@@ -54,6 +55,26 @@
func fatal(err error) {
os.Exit(1)
}
+func addNVIDIAHook(context *cli.Context, spec *specs.Spec) error {
+ path, err := exec.LookPath("nvidia-container-runtime-hook")
+ if err != nil {
+ return err
+ }
+ args := []string{path}
+ if context.GlobalBool("debug") {
+ args = append(args, "-debug")
+ }
+ if spec.Hooks == nil {
+ spec.Hooks = &specs.Hooks{}
+ }
+ spec.Hooks.Prestart = append(spec.Hooks.Prestart, specs.Hook{
+ Path: path,
+ Args: append(args, "prestart"),
+ })
+
+ return nil
+}
+
// setupSpec performs initial setup based on the cli.Context for the container
func setupSpec(context *cli.Context) (*specs.Spec, error) {
bundle := context.String("bundle")
@@ -66,6 +87,11 @@
func setupSpec(context *cli.Context) (*specs.Spec, error) {
if err != nil {
return nil, err
}
+
+ if err = addNVIDIAHook(context, spec); err != nil {
+ return nil, err
+ }
+
return spec, nil
}
--
2.7.4
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录