Skip to content

Commit

Permalink
Build: disable cyber_visualizer for non-Linux hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
storypku committed Nov 24, 2020
1 parent 4155cb4 commit 800abb7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions docker/scripts/dev_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ DEV_INSIDE="in-dev-docker"

SUPPORTED_ARCHS=(x86_64 aarch64)
HOST_ARCH="$(uname -m)"
HOST_OS="$(uname -s)"
TARGET_ARCH="$(uname -m)"

VERSION_X86_64="dev-x86_64-18.04-20201110_0617"
Expand Down Expand Up @@ -262,9 +263,8 @@ function determine_dev_image() {
}

function check_host_environment() {
local kernel="$(uname -s)"
if [[ "${kernel}" != "Linux" ]]; then
warning "Running Apollo dev container on ${kernel} is UNTESTED, exiting..."
if [[ "${HOST_OS}" != "Linux" ]]; then
warning "Running Apollo dev container on ${HOST_OS} is UNTESTED, exiting..."
exit 1
fi
}
Expand Down Expand Up @@ -523,6 +523,7 @@ function main() {
-e DOCKER_GRP="${group}" \
-e DOCKER_GRP_ID="${gid}" \
-e DOCKER_IMG="${APOLLO_DEV_IMAGE}" \
-e HOST_OS="${HOST_OS}" \
-e USE_GPU_HOST="${USE_GPU_HOST}" \
-e NVIDIA_VISIBLE_DEVICES=all \
-e NVIDIA_DRIVER_CAPABILITIES=compute,video,graphics,utility \
Expand Down
6 changes: 5 additions & 1 deletion scripts/apollo_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ function determine_build_targets() {
for component in $@; do
local build_targets
if [ "${component}" = "cyber" ]; then
build_targets="//cyber/... union //modules/tools/visualizer/..."
if [[ "${HOST_OS}" == "Linux" ]]; then
build_targets="//cyber/... union //modules/tools/visualizer/..."
else
build_targets="//cyber/..."
fi
elif [[ -d "${APOLLO_ROOT_DIR}/modules/${component}" ]]; then
build_targets="//modules/${component}/..."
else
Expand Down

0 comments on commit 800abb7

Please sign in to comment.