Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
fbf32a31
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,发现更多精彩内容 >>
提交
fbf32a31
编写于
6月 20, 2020
作者:
X
Xiangquan Xiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Docker_dev: Simple code clean.
上级
576d86dc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
38 addition
and
39 deletion
+38
-39
.bazelrc
.bazelrc
+0
-1
docker/build/installers/install_bazel.sh
docker/build/installers/install_bazel.sh
+1
-1
docker/scripts/dev_start.sh
docker/scripts/dev_start.sh
+37
-37
未找到文件。
.bazelrc
浏览文件 @
fbf32a31
...
...
@@ -2,4 +2,3 @@
# as recommended in https://github.com/bazelbuild/bazel/issues/6319
try-import %workspace%/tools/bazel.rc
try-import %workspace%/.apollo.bazelrc
docker/build/installers/install_bazel.sh
浏览文件 @
fbf32a31
...
...
@@ -21,7 +21,7 @@ set -e
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
.
/tmp/installers/
installer_base.sh
.
installer_base.sh
TARGET_ARCH
=
$(
uname
-m
)
VERSION
=
"3.2.0"
...
...
docker/scripts/dev_start.sh
浏览文件 @
fbf32a31
...
...
@@ -159,7 +159,7 @@ while [ $# -gt 0 ] ; do
;;
-c
|
--china
)
set_registry_mirrors
;;
;;
-f
|
--fast-test
)
FAST_TEST_MODE
=
"yes"
;;
...
...
@@ -182,9 +182,9 @@ while [ $# -gt 0 ] ; do
-y
)
;;
stop
)
stop_containers
exit
0
;;
stop_containers
exit
0
;;
*
)
echo
-e
"
\0
33[93mWarning
\0
33[0m: Unknown option:
$1
"
exit
2
...
...
@@ -273,39 +273,39 @@ DOCKER_RUN="docker run"
USE_GPU
=
0
function
determine_gpu_use
()
{
# Check nvidia-driver and GPU device
local
nv_driver
=
"nvidia-smi"
if
[
!
-x
"
$(
command
-v
${
nv_driver
}
)
"
]
;
then
warning
"No nvidia-driver found. CPU will be used"
elif
[
-z
"
$(
eval
${
nv_driver
}
)
"
]
;
then
warning
"No GPU device found. CPU will be used."
else
USE_GPU
=
1
fi
# Try to use GPU inside container
local
nv_docker_doc
=
"https://github.com/NVIDIA/nvidia-docker/blob/master/README.md"
if
[
${
USE_GPU
}
-eq
1
]
;
then
DOCKER_VERSION
=
$(
docker version
--format
'{{.Server.Version}}'
)
if
[
!
-z
"
$(
which nvidia-docker
)
"
]
;
then
DOCKER_RUN
=
"nvidia-docker run"
warning
"nvidia-docker is deprecated. Please install latest docker"
\
"and nvidia-container-toolkit as described by:"
warning
"
${
nv_docker_doc
}
"
elif
[
!
-z
"
$(
which nvidia-container-toolkit
)
"
]
;
then
if
dpkg
--compare-versions
"
${
DOCKER_VERSION
}
"
"ge"
"19.03"
;
then
DOCKER_RUN
=
"docker run --gpus all"
else
warning
"You must upgrade to docker-ce 19.03+ to access GPU from container!"
USE_GPU
=
0
fi
# Check nvidia-driver and GPU device
local
nv_driver
=
"nvidia-smi"
if
[
!
-x
"
$(
command
-v
${
nv_driver
}
)
"
]
;
then
warning
"No nvidia-driver found. CPU will be used"
elif
[
-z
"
$(
eval
${
nv_driver
}
)
"
]
;
then
warning
"No GPU device found. CPU will be used."
else
USE_GPU
=
0
warning
"Cannot access GPU from within container. Please install latest docker "
\
"and nvidia-container-toolkit as described by: "
warning
"
${
nv_docker_doc
}
"
USE_GPU
=
1
fi
# Try to use GPU inside container
local
nv_docker_doc
=
"https://github.com/NVIDIA/nvidia-docker/blob/master/README.md"
if
[
${
USE_GPU
}
-eq
1
]
;
then
DOCKER_VERSION
=
$(
docker version
--format
'{{.Server.Version}}'
)
if
[
!
-z
"
$(
which nvidia-docker
)
"
]
;
then
DOCKER_RUN
=
"nvidia-docker run"
warning
"nvidia-docker is deprecated. Please install latest docker "
\
"and nvidia-container-toolkit as described by:"
warning
"
${
nv_docker_doc
}
"
elif
[
!
-z
"
$(
which nvidia-container-toolkit
)
"
]
;
then
if
dpkg
--compare-versions
"
${
DOCKER_VERSION
}
"
"ge"
"19.03"
;
then
DOCKER_RUN
=
"docker run --gpus all"
else
warning
"You must upgrade to docker-ce 19.03+ to access GPU from container!"
USE_GPU
=
0
fi
else
USE_GPU
=
0
warning
"Cannot access GPU from within container. Please install "
\
"latest docker and nvidia-container-toolkit as described by: "
warning
"
${
nv_docker_doc
}
"
fi
fi
fi
}
function
main
()
{
...
...
@@ -334,7 +334,7 @@ function main() {
if
[
"
$FAST_TEST_MODE
"
==
"no"
]
;
then
# Included default maps.
for
map_name
in
${
DEFAULT_MAPS
[@]
}
;
do
source
${
APOLLO_ROOT_DIR
}
/docker/scripts/restart_map_volume.sh
${
map_name
}
"
${
VOLUME_VERSION
}
"
source
${
APOLLO_ROOT_DIR
}
/docker/scripts/restart_map_volume.sh
${
map_name
}
"
${
VOLUME_VERSION
}
"
done
YOLO3D_VOLUME
=
apollo_yolo3d_volume_
$USER
docker stop
${
YOLO3D_VOLUME
}
>
/dev/null 2>&1
...
...
@@ -347,7 +347,7 @@ function main() {
else
# Included default maps.
for
map_name
in
${
DEFAULT_TEST_MAPS
[@]
}
;
do
source
${
APOLLO_ROOT_DIR
}
/docker/scripts/restart_map_volume.sh
${
map_name
}
"
${
VOLUME_VERSION
}
"
source
${
APOLLO_ROOT_DIR
}
/docker/scripts/restart_map_volume.sh
${
map_name
}
"
${
VOLUME_VERSION
}
"
done
fi
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录