Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lukaCoding
nvidia-container-runtime
提交
fae68d4c
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,体验更适合开发者的 AI 搜索 >>
提交
fae68d4c
编写于
10月 23, 2019
作者:
R
Renaud Gaubert
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Build the containers in the CI
Signed-off-by:
N
Renaud Gaubert
<
rgaubert@nvidia.com
>
上级
a0cefeef
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
48 addition
and
91 deletion
+48
-91
.gitlab-ci.yml
.gitlab-ci.yml
+33
-80
Makefile
Makefile
+15
-11
未找到文件。
.gitlab-ci.yml
浏览文件 @
fae68d4c
variables
:
LICENSE_TAG
:
$CI_REGISTRY_IMAGE:license
PACKAGE_PATH
:
/go/src/gitlab.com/${CI_PROJECT_PATH}
BUILDER
:
${CI_REGISTRY_IMAGE}/builder:${CI_COMMIT_REF_NAME}
BASE
:
${CI_REGISTRY_IMAGE}/base
DOCKER_HOST
:
tcp://docker:2375
image
:
docker:latest
services
:
-
docker:dind
stages
:
-
docker_images
-
unit
-
integration
-
build
license-builder
:
image
:
docker:stable
stage
:
docker_images
services
:
-
docker:stable-dind
only
:
changes
:
-
license/Dockerfile
.build_template
:
&build_definition
stage
:
build
script
:
-
OS="${CI_JOB_NAME#*:}"
-
apk add make
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build -t $LICENSE_TAG ./license
-
docker push $LICENSE_TAG
-
make REGISTRY=${CI_REGISTRY_IMAGE} ${OS}
-
make REGISTRY=${CI_REGISTRY_IMAGE} push${OS}
artifacts
:
expire_in
:
1 week
paths
:
-
dist/
# Build the base images and store in gitlab registry
base-builder
:
stage
:
docker_images
image
:
docker:stable
services
:
-
docker:stable-dind
only
:
changes
:
-
base/*
before_script
:
-
docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
-
apk add --update make
script
:
-
make -C base base-push BASE=${BASE}
amd64:amzn1:
<<
:
*build_definition
gitlab-builder
:
stage
:
docker_images
image
:
docker:stable
services
:
-
docker:stable-dind
before_script
:
-
docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
script
:
-
docker build --build-arg PKG_PATH="${PACKAGE_PATH}" -t ${BUILDER} -f ./builder.Dockerfile .
-
docker push ${BUILDER}
amd64:amzn2:
<<
:
*build_definition
license
:
stage
:
unit
image
:
name
:
$LICENSE_TAG
script
:
-
./license/check.sh
amd64:centos7:
<<
:
*build_definition
code-check
:
stage
:
unit
image
:
${BUILDER}
script
:
-
cd ${PACKAGE_PATH}
-
make verify
amd64:opensuse-leap15.1:
<<
:
*build_definition
shim-test
:
stage
:
integration
image
:
${BUILDER}
before_script
:
-
mkdir /etc/nvidia-container-runtime && echo "" > /etc/nvidia-container-runtime/config.toml
# config for test
-
echo "" > /usr/bin/nvidia-container-runtime-hook
# hook for test
-
chmod +x /usr/bin/nvidia-container-runtime-hook
-
cd ${PACKAGE_PATH}/runtime/src
script
:
-
make test
amd64:debian9:
<<
:
*build_definition
build
:
stage
:
build
image
:
docker:stable
services
:
-
docker:stable-dind
before_script
:
-
docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
-
apk add --update make
script
:
-
make runtime BASE=${BASE}
# build all runtime packages
-
make toolkit BASE=${BASE}
# build all toolkit packages
artifacts
:
expire_in
:
1 week
paths
:
-
dist/
\ No newline at end of file
amd64:debian10:
<<
:
*build_definition
amd64:ubuntu16.04:
<<
:
*build_definition
amd64:ubuntu18.04:
<<
:
*build_definition
Makefile
浏览文件 @
fae68d4c
...
...
@@ -9,13 +9,17 @@ PKG_REV := 1
TOOLKIT_VERSION
:=
1.0.5
GOLANG_VERSION
:=
1.10.3
DIST_DIR
:=
$(CURDIR)
/../dist
DIST_DIR
:=
$(CURDIR)
/dist
REGISTRY
:=
nvidia
.NOTPARALLEL
:
.PHONY
:
all
all
:
ubuntu18.04 ubuntu16.04 debian10 debian9 centos7 amzn2 amzn1 opensuse-leap15.1
push%
:
$(DOCKER)
push
"
$(REGISTRY)
/runtime/
$*
"
ubuntu%
:
ARCH := amd64
ubuntu%
:
$(DOCKER)
build
--pull
\
...
...
@@ -24,10 +28,10 @@ ubuntu%:
--build-arg
PKG_VERS
=
"
$(VERSION)
"
\
--build-arg
PKG_REV
=
"
$(PKG_REV)
"
\
--build-arg
TOOLKIT_VERSION
=
"
$(TOOLKIT_VERSION)
"
\
--tag
"
nvidia/runtime/ubuntu:
$*
"
\
--tag
"
$(REGISTRY)
/runtime/ubuntu
$*
"
\
--file
docker/Dockerfile.ubuntu .
$(MKDIR)
-p
"
$(DIST_DIR)
/ubuntu
$*
/
$(ARCH)
"
$(DOCKER)
run
--cidfile
$@
.cid
"
nvidia/runtime/ubuntu:
$*
"
$(DOCKER)
run
--cidfile
$@
.cid
"
$(REGISTRY)
/runtime/ubuntu
$*
"
$(DOCKER)
cp
$$
(
cat
$@
.cid
)
:/dist/.
"
$(DIST_DIR)
/ubuntu
$*
/
$(ARCH)
/"
$(DOCKER)
rm
$$
(
cat
$@
.cid
)
&&
rm
$@
.cid
...
...
@@ -39,10 +43,10 @@ debian%:
--build-arg
PKG_VERS
=
"
$(VERSION)
"
\
--build-arg
PKG_REV
=
"
$(PKG_REV)
"
\
--build-arg
TOOLKIT_VERSION
=
"
$(TOOLKIT_VERSION)
"
\
--tag
"
nvidia/runtime/debian:
$*
"
\
--tag
"
$(REGISTRY)
/runtime/debian
$*
"
\
--file
docker/Dockerfile.debian .
$(MKDIR)
-p
"
$(DIST_DIR)
/debian
$*
/
$(ARCH)
"
$(DOCKER)
run
--cidfile
$@
.cid
"
nvidia/runtime/debian:
$*
"
$(DOCKER)
run
--cidfile
$@
.cid
"
$(REGISTRY)
/runtime/debian
$*
"
$(DOCKER)
cp
$$
(
cat
$@
.cid
)
:/dist/.
"
$(DIST_DIR)
/debian
$*
/
$(ARCH)
/"
$(DOCKER)
rm
$$
(
cat
$@
.cid
)
&&
rm
$@
.cid
...
...
@@ -54,10 +58,10 @@ centos%:
--build-arg
PKG_VERS
=
"
$(VERSION)
"
\
--build-arg
PKG_REV
=
"
$(PKG_REV)
"
\
--build-arg
TOOLKIT_VERSION
=
"
$(TOOLKIT_VERSION)
"
\
--tag
"
nvidia/runtime/centos:
$*
"
\
--tag
"
$(REGISTRY)
/runtime/centos
$*
"
\
--file
docker/Dockerfile.centos .
$(MKDIR)
-p
"
$(DIST_DIR)
/centos
$*
/
$(ARCH)
"
$(DOCKER)
run
--cidfile
$@
.cid
"
nvidia/runtime/centos:
$*
"
$(DOCKER)
run
--cidfile
$@
.cid
"
$(REGISTRY)
/runtime/centos
$*
"
$(DOCKER)
cp
$$
(
cat
$@
.cid
)
:/dist/.
"
$(DIST_DIR)
/centos
$*
/
$(ARCH)
/"
$(DOCKER)
rm
$$
(
cat
$@
.cid
)
&&
rm
$@
.cid
...
...
@@ -69,10 +73,10 @@ amzn%:
--build-arg
PKG_VERS
=
"
$(VERSION)
"
\
--build-arg
PKG_REV
=
"
$(PKG_REV)
"
\
--build-arg
TOOLKIT_VERSION
=
"
$(TOOLKIT_VERSION)
"
\
--tag
"
nvidia/runtime/amzn:
$*
"
\
--tag
"
$(REGISTRY)
/runtime/amzn
$*
"
\
--file
docker/Dockerfile.amzn .
$(MKDIR)
-p
"
$(DIST_DIR)
/amzn
$*
/
$(ARCH)
"
$(DOCKER)
run
--cidfile
$@
.cid
"
nvidia/runtime/amzn:
$*
"
$(DOCKER)
run
--cidfile
$@
.cid
"
$(REGISTRY)
/runtime/amzn
$*
"
$(DOCKER)
cp
$$
(
cat
$@
.cid
)
:/dist/.
"
$(DIST_DIR)
/amzn
$*
/
$(ARCH)
/"
$(DOCKER)
rm
$$
(
cat
$@
.cid
)
&&
rm
$@
.cid
...
...
@@ -84,9 +88,9 @@ opensuse-leap%:
--build-arg
PKG_VERS
=
"
$(VERSION)
"
\
--build-arg
PKG_REV
=
"
$(PKG_REV)
"
\
--build-arg
TOOLKIT_VERSION
=
"
$(TOOLKIT_VERSION)
"
\
--tag
"
nvidia/runtime/opensuse-leap:
$*
"
\
--tag
"
$(REGISTRY)
/runtime/opensuse-leap
$*
"
\
--file
docker/Dockerfile.opensuse-leap .
$(MKDIR)
-p
$(DIST_DIR)
/opensuse-leap
$*
/
$(ARCH)
$(DOCKER)
run
--cidfile
$@
.cid
"
nvidia/runtime/opensuse-leap:
$*
"
$(DOCKER)
run
--cidfile
$@
.cid
"
$(REGISTRY)
/runtime/opensuse-leap
$*
"
$(DOCKER)
cp
$$
(
cat
$@
.cid
)
:/dist/.
$(DIST_DIR)
/opensuse-leap
$*
/
$(ARCH)
/
$(DOCKER)
rm
$$
(
cat
$@
.cid
)
&&
rm
$@
.cid
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录