Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
2314d770
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,发现更多精彩内容 >>
提交
2314d770
编写于
5月 08, 2020
作者:
L
Liu Jiaming
提交者:
Xiangquan Xiao
5月 12, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bazel: introduce "--output_user_root" startup option
上级
29c7693f
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
45 addition
and
42 deletion
+45
-42
.bazelignore
.bazelignore
+4
-0
.gitignore
.gitignore
+3
-0
apollo.sh
apollo.sh
+2
-1
apollo_docker.sh
apollo_docker.sh
+7
-11
docker/scripts/cyber_start.sh
docker/scripts/cyber_start.sh
+5
-7
docker/scripts/dev_start.sh
docker/scripts/dev_start.sh
+8
-8
docker/scripts/release_start.sh
docker/scripts/release_start.sh
+4
-3
scripts/ota.sh
scripts/ota.sh
+11
-12
tools/bazel.rc
tools/bazel.rc
+1
-0
未找到文件。
.bazelignore
0 → 100644
浏览文件 @
2314d770
.cache
docs
docker
scripts
.gitignore
浏览文件 @
2314d770
...
...
@@ -70,3 +70,6 @@ docs/demo_guide/*.record
# Bash Environment
.dev_bash_hist
# bazel cache and others
.cache/
apollo.sh
浏览文件 @
2314d770
...
...
@@ -298,7 +298,8 @@ function warn_proprietary_sw() {
}
function
release
()
{
RELEASE_DIR
=
"
${
HOME
}
/.cache/apollo_release"
CACHE_DIR
=
"/apollo/.cache"
RELEASE_DIR
=
"
${
CACHE_DIR
}
/apollo_release"
if
[
-d
"
${
RELEASE_DIR
}
"
]
;
then
rm
-rf
"
${
RELEASE_DIR
}
"
fi
...
...
apollo_docker.sh
浏览文件 @
2314d770
...
...
@@ -79,8 +79,8 @@ function start_build_docker() {
function
gen_docker
()
{
IMG
=
"apolloauto/apollo:run-
${
MACHINE_ARCH
}
-20181017_1330"
RELEASE_DIR
=
${
HOME
}
/.cache/apollo_release
APOLLO_DIR
=
"
${
RELEASE_DIR
}
/apollo"
CACHE_ROOT_DIR
=
"
${
DIR
}
/.cache"
APOLLO_DIR
=
"
${
CACHE_ROOT_DIR
}
/apollo_release
/apollo"
if
[
!
-d
"
${
APOLLO_DIR
}
"
]
;
then
echo
"Release directory does not exist!"
...
...
@@ -102,7 +102,7 @@ function gen_docker() {
-d
\
--name
apollo_release
\
--net
host
\
-v
$
HOME
/.cache
:/root/mnt
\
-v
$
{
CACHE_ROOT_DIR
}
:/root/mnt
\
-w
/apollo
\
"
$IMG
"
...
...
@@ -112,16 +112,11 @@ function gen_docker() {
RELEASE_TGZ
=
"apollo_release.tar.gz"
SEC_RELEASE_TGZ
=
"sec_apollo_release.tar.gz"
if
[
-e
"
$HOME
/.cache/
$RELEASE_TGZ
"
]
;
then
rm
$HOME
/.cache/
$RELEASE_TGZ
fi
if
[
-e
"
$HOME
/.cache/
$SEC_RELEASE_TGZ
"
]
;
then
rm
$HOME
/.cache/
$SEC_RELEASE_TGZ
fi
[
-e
"
${
CACHE_ROOT_DIR
}
/
${
RELEASE_TGZ
}
"
]
&&
rm
-f
"
${
CACHE_ROOT_DIR
}
/
${
RELEASE_TGZ
}
"
[
-e
"
${
CACHE_ROOT_DIR
}
/
${
SEC_RELEASE_TGZ
}
"
]
&&
rm
-f
"
${
CACHE_ROOT_DIR
}
/
${
SEC_RELEASE_TGZ
}
"
# generate security release package
tar
czf
$HOME
/.cache/
$RELEASE_TGZ
-C
$HOME
/.cache
apollo_release
tar
czf
"
${
CACHE_ROOT_DIR
}
/
${
RELEASE_TGZ
}
"
-C
"
${
CACHE_ROOT_DIR
}
"
apollo_release
python modules/tools/ota/create_sec_package.py
docker
exec
apollo_release
cp
/root/mnt/
${
SEC_RELEASE_TGZ
}
/root
fi
...
...
@@ -162,6 +157,7 @@ case $1 in
gen_docker
;;
*
)
# TODO(storypku): fix user account issue
docker
exec
-u
$USER
apollo_dev_
$USER
bash
-c
"./apollo.sh
$@
"
;;
esac
docker/scripts/cyber_start.sh
浏览文件 @
2314d770
...
...
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
APOLLO_ROOT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../.."
&&
pwd
-P
)
"
CACHE_ROOT_DIR
=
"
${
APOLLO_ROOT_DIR
}
/.cache"
INCHINA
=
"no"
LOCAL_IMAGE
=
"no"
...
...
@@ -86,7 +88,6 @@ do
done
}
APOLLO_ROOT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../.."
&&
pwd
)
"
if
[
!
-e
/apollo
]
;
then
sudo ln
-sf
${
APOLLO_ROOT_DIR
}
/apollo
...
...
@@ -160,8 +161,7 @@ IMG=${DOCKER_REPO}:$VERSION
function
local_volumes
()
{
# Apollo root and bazel cache dirs are required.
volumes
=
"-v
$APOLLO_ROOT_DIR
:/apollo
\
-v
$HOME
/.cache:
${
DOCKER_HOME
}
/.cache"
volumes
=
"-v
$APOLLO_ROOT_DIR
:/apollo"
case
"
$(
uname
-s
)
"
in
Linux
)
case
"
$(
lsb_release
-r
|
cut
-f2
)
"
in
...
...
@@ -179,8 +179,6 @@ function local_volumes() {
-v /lib/modules:/lib/modules"
;;
Darwin
)
# MacOS has strict limitations on mapping volumes.
chmod
-R
a+wr ~/.cache/bazel
;;
esac
echo
"
${
volumes
}
"
...
...
@@ -223,8 +221,8 @@ function main(){
if
[
"
$USER
"
==
"root"
]
;
then
DOCKER_HOME
=
"/root"
fi
if
[
!
-d
"
$
HOME
/.cache"
]
;
then
mkdir
"
$
HOME
/.cache
"
if
[
!
-d
"
$
{
CACHE_ROOT_DIR
}
"
]
;
then
mkdir
"
$
{
CACHE_ROOT_DIR
}
"
fi
info
"Starting docker container
\"
${
APOLLO_CYBER
}
\"
..."
...
...
docker/scripts/dev_start.sh
浏览文件 @
2314d770
...
...
@@ -16,6 +16,9 @@
# limitations under the License.
###############################################################################
APOLLO_ROOT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../.."
&&
pwd
)
"
CACHE_ROOT_DIR
=
"
${
APOLLO_ROOT_DIR
}
/.cache"
LOCAL_IMAGE
=
"no"
FAST_BUILD_MODE
=
"no"
FAST_TEST_MODE
=
"no"
...
...
@@ -85,6 +88,7 @@ do
fi
done
}
function
set_registry_mirrors
()
{
sed
-i
'$aDOCKER_OPTS=\"--registry-mirror=http://hub-mirror.c.163.com\"'
/etc/default/docker
...
...
@@ -92,7 +96,6 @@ sed -i '$i ,"registry-mirrors": [ "http://hub-mirror.c.163.com"]' /etc/docker/d
service docker restart
}
APOLLO_ROOT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../.."
&&
pwd
-P
)
"
if
[
"
$(
readlink
-f
/apollo
)
"
!=
"
${
APOLLO_ROOT_DIR
}
"
]
;
then
sudo ln
-snf
${
APOLLO_ROOT_DIR
}
/apollo
...
...
@@ -207,8 +210,7 @@ LOCAL_THIRD_PARTY_VOLUME_IMAGE=${DOCKER_REPO}:local_third_party_volume-${ARCH}-l
function
local_volumes
()
{
set
+x
# Apollo root and bazel cache dirs are required.
volumes
=
"-v
$APOLLO_ROOT_DIR
:/apollo
\
-v
$HOME
/.cache:
${
DOCKER_HOME
}
/.cache"
volumes
=
"-v
$APOLLO_ROOT_DIR
:/apollo"
APOLLO_TELEOP
=
"
${
APOLLO_ROOT_DIR
}
/../apollo-teleop"
if
[
-d
${
APOLLO_TELEOP
}
]
;
then
volumes
=
"-v
${
APOLLO_TELEOP
}
:/apollo/modules/teleop
${
volumes
}
"
...
...
@@ -231,8 +233,6 @@ function local_volumes() {
-v /lib/modules:/lib/modules"
;;
Darwin
)
# MacOS has strict limitations on mapping volumes.
chmod
-R
a+wr ~/.cache/bazel
;;
esac
echo
"
${
volumes
}
"
...
...
@@ -280,7 +280,7 @@ function main(){
if
[
$?
==
0
]
;
then
if
[[
"
$(
docker inspect
--format
=
'{{.Config.Image}}'
$APOLLO_DEV
2> /dev/null
)
"
!=
"
$APOLLO_DEV_IMAGE
"
]]
;
then
rm
-rf
$APOLLO_ROOT_DIR
/bazel-
*
rm
-rf
$
HOME
/.cache
/bazel/
*
rm
-rf
$
{
CACHE_ROOT_DIR
}
/bazel/
*
fi
docker stop
$APOLLO_DEV
1>/dev/null
docker
rm
-v
-f
$APOLLO_DEV
1>/dev/null
...
...
@@ -350,8 +350,8 @@ function main(){
if
[
"
$USER
"
==
"root"
]
;
then
DOCKER_HOME
=
"/root"
fi
if
[
!
-d
"
$
HOME
/.cache"
]
;
then
mkdir
"
$
HOME
/.cache
"
if
[
!
-d
"
$
{
CACHE_ROOT_DIR
}
"
]
;
then
mkdir
"
$
{
CACHE_ROOT_DIR
}
"
fi
info
"Starting docker container
\"
${
APOLLO_DEV
}
\"
..."
...
...
docker/scripts/release_start.sh
浏览文件 @
2314d770
...
...
@@ -18,6 +18,8 @@
APOLLO_ROOT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../.."
&&
pwd
)
"
CACHE_ROOT_DIR
=
"
${
APOLLO_ROOT_DIR
}
/.cache"
# the machine type, currently support x86_64, aarch64
MACHINE_ARCH
=
$(
uname
-m
)
...
...
@@ -80,8 +82,8 @@ function main() {
if
[
"
$USER
"
==
"root"
]
;
then
DOCKER_HOME
=
"/root"
fi
if
[
!
-d
"
$
HOME
/.cache"
]
;
then
mkdir
"
$
HOME
/.cache
"
if
[
!
-d
"
$
{
CACHE_ROOT_DIR
}
"
]
;
then
mkdir
"
$
{
CACHE_ROOT_DIR
}
"
fi
DOCKER_CMD
=
"nvidia-docker"
...
...
@@ -96,7 +98,6 @@ function main() {
-v
${
HOME
}
/data:/apollo/data
\
-v
/tmp/.X11-unix:/tmp/.X11-unix:rw
\
-v
/etc/localtime:/etc/localtime:ro
\
-v
$HOME
/.cache:
${
DOCKER_HOME
}
/.cache
\
-w
/apollo
\
-e
DISPLAY
=
${
display
}
\
-e
RELEASE_DOCKER
=
1
\
...
...
scripts/ota.sh
浏览文件 @
2314d770
...
...
@@ -17,6 +17,7 @@
###############################################################################
APOLLO_ROOT
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/.."
&&
pwd
)
"
CACHE_DIR
=
"
${
APOLLO_ROOT
}
/.cache"
function
update
()
{
UPDATE_TAG
=
$(
python
${
APOLLO_ROOT
}
/modules/tools/ota/query_client.py
)
...
...
@@ -31,28 +32,26 @@ function update() {
if
[
"
$user_agreed
"
!=
"y"
]
&&
[
"
$user_agreed
"
!=
"Y"
]
;
then
exit
1
fi
cp
${
APOLLO_ROOT
}
/scripts/ota.sh
/home/
$DOCKER_USER
/.cache/
ssh
$DOCKER_USER
@localhost bash
/home/
$DOCKER_USER
/.cache
/ota.sh download
$UPDATE_TAG
cp
${
APOLLO_ROOT
}
/scripts/ota.sh
"
${
CACHE_DIR
}
"
ssh
$DOCKER_USER
@localhost bash
${
CACHE_DIR
}
/ota.sh download
$UPDATE_TAG
python
${
APOLLO_ROOT
}
/modules/tools/ota/verify_client.py
if
[
"
$?
"
!=
"0"
]
;
then
exit
1
fi
if
[
-e
"
$HOME
/.cache/apollo_release"
]
;
then
rm
-rf
"
$HOME
/.cache/apollo_release"
fi
tar
xzf /home/
$DOCKER_USER
/.cache/apollo_release.tar.gz
-C
/home/
$DOCKER_USER
/.cache
[
-e
"
${
CACHE_DIR
}
/apollo_release"
]
&&
rm
-rf
"
${
CACHE_DIR
}
/apollo_release"
tar
xzf
${
CACHE_DIR
}
/apollo_release.tar.gz
-C
${
CACHE_DIR
}
NEW_TAG
=
"
${
UPDATE_TAG
}
-local"
ssh
$DOCKER_USER
@localhost bash
/home/
$DOCKER_USER
/.cache
/ota.sh setup
$NEW_TAG
ssh
$DOCKER_USER
@localhost bash
${
CACHE_DIR
}
/ota.sh setup
$NEW_TAG
python
${
APOLLO_ROOT
}
/modules/tools/ota/update_client.py
${
UPDATE_TAG
}
}
function
clean
()
{
rm
-rf
$
HOME
/.cache
/apollo_update
rm
-rf
$
HOME
/.cache
/apollo_release.tar.gz
rm
-rf
$
HOME
/.cache
/sec_apollo_release.tar.gz
rm
-rf
$
HOME
/.cache
/ota.sh
rm
-rf
$
{
CACHE_DIR
}
/apollo_update
rm
-rf
$
{
CACHE_DIR
}
/apollo_release.tar.gz
rm
-rf
$
{
CACHE_DIR
}
/sec_apollo_release.tar.gz
rm
-rf
$
{
CACHE_DIR
}
/ota.sh
docker stop test_container 1>/dev/null
docker
rm
test_container 1>/dev/null
}
...
...
@@ -78,7 +77,7 @@ function download() {
docker stop test_container 1>/dev/null
docker
rm
-f
test_container 1>/dev/null
fi
docker run
-d
-it
--name
test_container
-v
$
HOME
/.cache
:/root/mnt
$UPDATE_TAG
docker run
-d
-it
--name
test_container
-v
$
{
CACHE_DIR
}
:/root/mnt
$UPDATE_TAG
docker
exec
test_container
cp
/root/sec_apollo_release.tar.gz /root/mnt
}
...
...
tools/bazel.rc
浏览文件 @
2314d770
...
...
@@ -12,6 +12,7 @@ startup --batch_cpu_scheduling
startup --host_jvm_args=-XX:-UseParallelGC
startup --output_user_root=/apollo/.cache/bazel
# +------------------------------------------------------------+
# | Test Configurations |
# +------------------------------------------------------------+
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录