Skip to content

Commit e946771

Browse files
committed
Save
1 parent 9a4300e commit e946771

File tree

4 files changed

+28
-9
lines changed

4 files changed

+28
-9
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@
2121
# This setup requires to all of our docker containers have arrow's source
2222
# as a mounted directory.
2323

24+
ci
25+
dev
2426
**/target/*

dev/docker/rust-base.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
# Base image extends debian:buster-slim
26-
FROM rust:1.49.0-buster AS builder
26+
FROM rust:1.51.0-buster AS builder
2727

2828
RUN apt update && apt -y install musl musl-dev musl-tools libssl-dev openssl
2929

dev/docker/rust.dockerfile

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,57 @@
2222
# as a mounted directory.
2323

2424
ARG RELEASE_FLAG=--release
25-
FROM ballistacompute/rust-base:0.4.0-20210213 AS base
25+
FROM ballistacompute/rust-base:0.4.2-SNAPSHOT AS base
2626
WORKDIR /tmp/ballista
2727
RUN apt-get -y install cmake
2828
RUN cargo install cargo-chef
2929

3030
FROM base as planner
31-
ADD datafusion .
32-
ADD ballista .
31+
RUN mkdir /tmp/ballista/ballista
32+
RUN mkdir /tmp/ballista/benchmarks
33+
RUN mkdir /tmp/ballista/datafusion
34+
RUN mkdir /tmp/ballista/datafusion-examples
35+
ADD Cargo.toml .
36+
COPY benchmarks ./benchmarks/
37+
COPY datafusion ./datafusion/
38+
COPY datafusion-examples ./datafusion-examples/
39+
COPY ballista ./ballista/
3340
RUN cargo chef prepare --recipe-path recipe.json
3441

3542
FROM base as cacher
3643
COPY --from=planner /tmp/ballista/recipe.json recipe.json
3744
RUN cargo chef cook $RELEASE_FLAG --recipe-path recipe.json
3845

3946
FROM base as builder
40-
ADD datafusion .
41-
ADD ballista .
47+
RUN mkdir /tmp/ballista/ballista
48+
RUN mkdir /tmp/ballista/benchmarks
49+
RUN mkdir /tmp/ballista/datafusion
50+
RUN mkdir /tmp/ballista/datafusion-examples
51+
ADD Cargo.toml .
52+
COPY benchmarks ./benchmarks/
53+
COPY datafusion ./datafusion/
54+
COPY ballista ./ballista/
55+
COPY datafusion-examples ./datafusion-examples/
4256
COPY --from=cacher /tmp/ballista/target target
4357
ARG RELEASE_FLAG=--release
4458

4559
# force build.rs to run to generate configure_me code.
4660
ENV FORCE_REBUILD='true'
4761
RUN cargo build $RELEASE_FLAG
62+
RUN cd ballista/rust && \
63+
cargo build $RELEASE_FLAG
4864

4965
# put the executor on /executor (need to be copied from different places depending on FLAG)
5066
ENV RELEASE_FLAG=${RELEASE_FLAG}
51-
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/target/debug/ballista-executor /executor; else mv /tmp/ballista/target/release/ballista-executor /executor; fi
67+
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/ballista/rust/target/debug/ballista-executor /executor; else mv /tmp/ballista/ballista/rust/target/release/ballista-executor /executor; fi
5268

5369
# put the scheduler on /scheduler (need to be copied from different places depending on FLAG)
5470
ENV RELEASE_FLAG=${RELEASE_FLAG}
55-
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/target/debug/ballista-scheduler /scheduler; else mv /tmp/ballista/target/release/ballista-scheduler /scheduler; fi
71+
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/ballista/rust/target/debug/ballista-scheduler /scheduler; else mv /tmp/ballista/ballista/rust/target/release/ballista-scheduler /scheduler; fi
5672

5773
# put the tpch on /tpch (need to be copied from different places depending on FLAG)
5874
ENV RELEASE_FLAG=${RELEASE_FLAG}
59-
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/target/debug/tpch /tpch; else mv /tmp/ballista/target/release/tpch /tpch; fi
75+
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/ballista/rust/target/debug/tpch /tpch; else mv /tmp/ballista/ballista/rust/target/release/tpch /tpch; fi
6076

6177
# Copy the binary into a new container for a smaller docker image
6278
FROM ballistacompute/rust-base:0.4.0-20210213

dev/integration-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919
set -e
20+
./dev/build-rust-base.sh
2021
./dev/build-rust.sh
2122
pushd ballista/rust/benchmarks/tpch
2223
./tpch-gen.sh

0 commit comments

Comments
 (0)