ray/docker/deploy/Dockerfile
mehrdadn ffb88cda6f
Fix Bazel in Docker (#9530)
Co-authored-by: Mehrdad <noreply@github.com>
2020-07-17 11:39:38 -07:00

17 lines
708 B
Docker

# The deploy Docker image build a self-contained Ray instance suitable
# for end users.
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 --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
WORKDIR /ray/
# The result of bazel build is reused in pip install. It if run first to allow
# for failover to serial build if parallel build requires too much resources.
RUN bazel build //:ray_pkg || bazel build --jobs 1 //:ray_pkg
WORKDIR /ray/python/
RUN pip install -e .
WORKDIR /ray