|
22 | 22 | # as a mounted directory. |
23 | 23 |
|
24 | 24 | 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 |
26 | 26 | WORKDIR /tmp/ballista |
27 | 27 | RUN apt-get -y install cmake |
28 | 28 | RUN cargo install cargo-chef |
29 | 29 |
|
30 | 30 | FROM base as planner |
31 | | -COPY rust . |
| 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/ |
32 | 40 | RUN cargo chef prepare --recipe-path recipe.json |
33 | 41 |
|
34 | 42 | FROM base as cacher |
35 | 43 | COPY --from=planner /tmp/ballista/recipe.json recipe.json |
36 | 44 | RUN cargo chef cook $RELEASE_FLAG --recipe-path recipe.json |
37 | 45 |
|
38 | 46 | FROM base as builder |
39 | | -COPY rust . |
| 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/ |
40 | 56 | COPY --from=cacher /tmp/ballista/target target |
41 | 57 | ARG RELEASE_FLAG=--release |
42 | 58 |
|
43 | 59 | # force build.rs to run to generate configure_me code. |
44 | 60 | ENV FORCE_REBUILD='true' |
45 | 61 | RUN cargo build $RELEASE_FLAG |
| 62 | +RUN cd ballista/rust && \ |
| 63 | + cargo build $RELEASE_FLAG |
46 | 64 |
|
47 | 65 | # put the executor on /executor (need to be copied from different places depending on FLAG) |
48 | 66 | ENV RELEASE_FLAG=${RELEASE_FLAG} |
49 | | -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 |
50 | 68 |
|
51 | 69 | # put the scheduler on /scheduler (need to be copied from different places depending on FLAG) |
52 | 70 | ENV RELEASE_FLAG=${RELEASE_FLAG} |
53 | | -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 |
54 | 72 |
|
55 | 73 | # put the tpch on /tpch (need to be copied from different places depending on FLAG) |
56 | 74 | ENV RELEASE_FLAG=${RELEASE_FLAG} |
57 | | -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 |
58 | 76 |
|
59 | 77 | # Copy the binary into a new container for a smaller docker image |
60 | 78 | FROM ballistacompute/rust-base:0.4.0-20210213 |
|
0 commit comments