Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
19a9535a
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
19a9535a
编写于
2月 15, 2021
作者:
S
Sergey Grebennikov
提交者:
Liu Jiaming
2月 18, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Docker: Add different installation modes for deviceQuery package
上级
1a5bc7a0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
48 addition
and
16 deletion
+48
-16
docker/build/installers/install_deviceQuery.sh
docker/build/installers/install_deviceQuery.sh
+48
-16
未找到文件。
docker/build/installers/install_deviceQuery.sh
浏览文件 @
19a9535a
...
...
@@ -16,6 +16,12 @@
# limitations under the License.
###############################################################################
INSTALL_MODE
=
"
$1
"
;
shift
if
[[
-z
"
${
INSTALL_MODE
}
"
]]
;
then
INSTALL_MODE
=
"download"
fi
# Fail on first error.
set
-e
...
...
@@ -24,7 +30,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
TARGET_ARCH
=
"
$(
uname
-m
)
"
if
[[
-z
"
${
CUDA_VERSION
}
"
]]
if
[[
-z
"
${
CUDA_VERSION
}
"
||
"
${
INSTALL_MODE
}
"
==
"download"
]]
then
if
[[
"
${
TARGET_ARCH
}
"
==
"x86_64"
]]
;
then
CUDA_VERSION
=
"11.1.74-1"
...
...
@@ -34,30 +40,56 @@ then
fi
MAIN_VER_DOT
=
"
${
CUDA_VERSION
%.*
}
"
MAIN_VER
=
"
${
MAIN_VER_DOT
//./-
}
"
CUDA_SAMPLES
=
"cuda-samples"
DEVICE_QUERY_BINARY
=
CHECKSUM
=
DEMO_SUITE_DEST_DIR
=
"/usr/local/cuda-
${
MAIN_VER_DOT
}
/extras/demo_suite"
git clone
-b
v
${
MAIN_VER_DOT
}
--single-branch
https://github.com/NVIDIA/
${
CUDA_SAMPLES
}
.git
${
CUDA_SAMPLES
}
pushd
${
CUDA_SAMPLES
}
/Samples/deviceQuery/
if
[[
-x
"
${
DEMO_SUITE_DEST_DIR
}
/deviceQuery"
]]
;
then
info
"Found existing deviceQuery under
${
DEMO_SUITE_DEST_DIR
}
, do nothing."
exit
0
fi
if
[[
"
${
INSTALL_MODE
}
"
==
"download"
]]
;
then
# steps to download
if
[[
"
${
TARGET_ARCH
}
"
==
"x86_64"
]]
;
then
make
DEVICE_QUERY_BINARY
=
"deviceQuery-
${
MAIN_VER
}
_
${
CUDA_VERSION
}
_amd64.bin"
CHECKSUM
=
"da573cc68ad5fb227047064d73123a8a966df35be19b68163338b6dc0d576c84"
elif
[[
"
${
TARGET_ARCH
}
"
==
"aarch64"
]]
;
then
make
TARGET_ARCH
=
aarch64
DEVICE_QUERY_BINARY
=
"deviceQuery-
${
MAIN_VER
}
_
${
CUDA_VERSION
}
_arm64.bin"
CHECKSUM
=
"fe55e0da8ec20dc13e778ddf7ba95bca45efd51d8f4e6c4fd05f2fb9856f4ac8"
else
error
"Support for
${
TARGET_ARCH
}
not ready yet."
exit
1
fi
DEMO_SUITE_DEST_DIR
=
"/usr/local/cuda-
${
MAIN_VER_DOT
}
/extras/demo_suite"
if
[[
-x
"
${
DEMO_SUITE_DEST_DIR
}
/deviceQuery"
]]
;
then
info
"Found existing deviceQuery under
${
DEMO_SUITE_DEST_DIR
}
, do nothing."
exit
0
fi
DOWNLOAD_LINK
=
"https://apollo-system.cdn.bcebos.com/archive/6.0/
${
DEVICE_QUERY_BINARY
}
"
download_if_not_cached
"
${
DEVICE_QUERY_BINARY
}
"
"
${
CHECKSUM
}
"
"
${
DOWNLOAD_LINK
}
"
[[
-d
"
${
DEMO_SUITE_DEST_DIR
}
"
]]
||
mkdir
-p
"
${
DEMO_SUITE_DEST_DIR
}
"
cp
deviceQuery
"
${
DEMO_SUITE_DEST_DIR
}
/
"
cp
${
DEVICE_QUERY_BINARY
}
"
${
DEMO_SUITE_DEST_DIR
}
/deviceQuery
"
chmod
a+x
"
${
DEMO_SUITE_DEST_DIR
}
/deviceQuery"
popd
# clean up
rm
-rf
"
${
CUDA_SAMPLES
}
"
# clean up
rm
-rf
"
${
DEVICE_QUERY_BINARY
}
"
else
# steps to build from source
git clone
-b
v
${
MAIN_VER_DOT
}
--single-branch
https://github.com/NVIDIA/
${
CUDA_SAMPLES
}
.git
${
CUDA_SAMPLES
}
pushd
${
CUDA_SAMPLES
}
/Samples/deviceQuery/
if
[[
"
${
TARGET_ARCH
}
"
==
"x86_64"
]]
;
then
make
elif
[[
"
${
TARGET_ARCH
}
"
==
"aarch64"
]]
;
then
make
TARGET_ARCH
=
aarch64
else
error
"Support for
${
TARGET_ARCH
}
not ready yet."
exit
1
fi
[[
-d
"
${
DEMO_SUITE_DEST_DIR
}
"
]]
||
mkdir
-p
"
${
DEMO_SUITE_DEST_DIR
}
"
cp
deviceQuery
"
${
DEMO_SUITE_DEST_DIR
}
/"
chmod
a+x
"
${
DEMO_SUITE_DEST_DIR
}
/deviceQuery"
popd
# clean up
rm
-rf
"
${
CUDA_SAMPLES
}
"
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录