|
| 1 | +# syntax=docker/dockerfile:1 |
| 2 | + |
| 3 | +FROM quay.io/pypa/manylinux_2_28_aarch64 AS base |
| 4 | + |
| 5 | +WORKDIR /root |
| 6 | + |
| 7 | +RUN <<EOF |
| 8 | + dnf install -y epel-release |
| 9 | + dnf install -y curl pkg-config openssl ca-certificates openssl-devel patchelf autoconf automake make libtool unzip clang libatomic protobuf-c-compiler openssh-clients |
| 10 | +EOF |
| 11 | + |
| 12 | +RUN <<EOF |
| 13 | + curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y |
| 14 | +EOF |
| 15 | + |
| 16 | +RUN --mount=type=ssh,mode=0666 \ |
| 17 | + <<EOF |
| 18 | + mkdir -p -m 0700 ~/.ssh |
| 19 | + ssh-keyscan git.corp.adobe.com >> ~/.ssh/known_hosts |
| 20 | + ssh-keyscan github.com >> ~/.ssh/known_hosts |
| 21 | +EOF |
| 22 | + |
| 23 | +RUN --mount=type=bind,source=requirements.txt,target=requirements.txt \ |
| 24 | + --mount=type=bind,source=src,target=src,readwrite \ |
| 25 | + --mount=type=bind,source=python,target=python,readwrite \ |
| 26 | + --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ |
| 27 | + --mount=type=bind,source=build.rs,target=build.rs \ |
| 28 | + --mount=type=bind,source=Cargo.toml,target=Cargo.toml \ |
| 29 | + --mount=type=bind,source=Cargo.lock,target=Cargo.lock \ |
| 30 | + --mount=type=bind,source=README.md,target=README.md \ |
| 31 | + --mount=type=bind,source=LICENSE.txt,target=LICENSE.txt \ |
| 32 | + --mount=type=cache,mode=0777,target=/root/target \ |
| 33 | + --mount=type=cache,mode=0777,target=/usr/local/cargo/registry/ \ |
| 34 | + --mount=type=ssh,mode=0666 \ |
| 35 | + <<EOF |
| 36 | + export PATH="/root/.cargo/bin:/opt/python/cp312-cp312/bin:$PATH" |
| 37 | + python3 -m venv venv |
| 38 | + source venv/bin/activate |
| 39 | + source /root/.cargo/env |
| 40 | + pip3 install maturin==1.8.1 |
| 41 | + pip3 install -r requirements.txt |
| 42 | + maturin build --release --manylinux 2_28 --features protoc,substrait |
| 43 | + cp ./target/wheels/*.whl / |
| 44 | +EOF |
0 commit comments