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