Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ci/travis/install-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -euo pipefail

ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)

arg1="${1-}"

version="3.2.0"
achitecture="${HOSTTYPE}"
platform="unknown"
Expand Down Expand Up @@ -50,9 +52,9 @@ else
target="./install.sh"
curl -f -s -L -R -o "${target}" "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-installer-${platform}-${achitecture}.sh"
chmod +x "${target}"
if [ "${CI-}" = true ]; then
sudo "${target}" > /dev/null # system-wide install for CI
command -V bazel 1>&2
if [ "${CI-}" = true ] || [ "${arg1-}" = "--system" ]; then
"$(command -v sudo || echo command)" "${target}" > /dev/null # system-wide install for CI
which bazel > /dev/null
else
"${target}" --user > /dev/null
fi
Expand Down
2 changes: 1 addition & 1 deletion docker/deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
FROM ray-project/base-deps
ADD ray.tar /ray
ADD git-rev /ray/git-rev
RUN cd /ray && git init && ./ci/travis/install-bazel.sh
RUN cd /ray && git init && ./ci/travis/install-bazel.sh --system
ENV PATH=$PATH:/root/bin
RUN echo 'build --remote_cache="https://storage.googleapis.com/ray-bazel-cache"' >> $HOME/.bazelrc
RUN echo 'build --remote_upload_local_results=false' >> $HOME/.bazelrc
Expand Down
2 changes: 1 addition & 1 deletion docker/tune_test/build_from_source.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN pip install -r requirements.txt
ADD ray.tar /ray
ADD git-rev /ray/git-rev

RUN bash /ray/ci/travis/install-bazel.sh
RUN bash /ray/ci/travis/install-bazel.sh --system
RUN echo 'build --remote_cache="https://storage.googleapis.com/ray-bazel-cache"' >> $HOME/.bazelrc
RUN echo 'build --remote_upload_local_results=false' >> $HOME/.bazelrc
RUN cd /ray/python; pip install -e . --verbose
Expand Down