mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +08:00
Fix Bazel in Docker (#9530)
Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user