Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduced support for aarch64 Linux #9

Open
wants to merge 4 commits into
base: deploy/test-pypi
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 34 additions & 32 deletions .github/containers/manylinux_aarch64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,40 @@

FROM quay.io/pypa/manylinux_2_28_aarch64:2024-08-12-7fde9b1

# building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988)
RUN dnf -y install curl zip unzip tar ninja-build perl-IPC-Cmd

RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg && \
git -C /opt/vcpkg checkout tags/2024.09.30

ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg"
ENV PATH="${PATH}:/opt/vcpkg"

ENV VCPKG_DEFAULT_TRIPLET="arm64-linux-dynamic-release"
# pkgconf fails to build with default debug mode of arm64-linux host
ENV VCPKG_DEFAULT_HOST_TRIPLET="arm64-linux-release"

# Must be set when building on arm
ENV VCPKG_FORCE_SYSTEM_BINARIES=1

# mkdir & touch -> workaround for https://github.com/microsoft/vcpkg/issues/27786
RUN bootstrap-vcpkg.sh && \
mkdir -p /root/.vcpkg/ $HOME/.vcpkg && \
touch /root/.vcpkg/vcpkg.path.txt $HOME/.vcpkg/vcpkg.path.txt && \
vcpkg integrate install && \
vcpkg integrate bash

# COPY ci/custom-triplets/arm64-linux-dynamic-release.cmake opt/vcpkg/custom-triplets/arm64-linux-dynamic-release.cmake
COPY vcpkg.json opt/vcpkg/

ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/arm64-linux-dynamic-release/lib"
RUN vcpkg install --overlay-triplets=opt/vcpkg/custom-triplets \
--feature-flags="versions,manifests" \
--x-manifest-root=opt/vcpkg \
--x-install-root=opt/vcpkg/installed && \
vcpkg list
# Required system dependencies:
# * libepoxy: libx11-dev libgles2-mesa-dev
# * libxcrypt: autoconf automake libtool pkg-config
# * python3: autoconf autoconf-archive automake
# * openssl: perl-ICP-Cmd
RUN yum -y install \
curl zip unzip tar \
cmake ninja-build \
autoconf autoconf-archive automake libtool pkg-config \
perl-IPC-Cmd \
python311 \
opencv opencv-devel \
openblas openblas-devel \
libgfortran

RUN git clone https://github.com/davisking/dlib.git /opt/dlib && \
git -C /opt/dlib checkout tags/v19.24.6

WORKDIR /opt/dlib

RUN mkdir build

WORKDIR /opt/dlib/build

RUN cmake .. && \
cmake --build .

RUN ls -r dlib

WORKDIR /opt/dlib/build/dlib

RUN make install

ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/:/opt/vcpkg/installed/x64-linux/lib"

# setting git safe directory is required for properly building wheels when
# git >= 2.35.3
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/cd-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- "deploy/test-pypi"
tags:
- v[0-9]+.*

jobs:
# TODO: think about reusing these jobs instead of duplicating them
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: CD

on:
push:
branches:
- "main"
tags:
- v[0-9]+.*

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ jobs:
- wheel_name: "mini-face-manylinux_2_28_x86_64"
architecture: "x86_64"
container: ".github/containers/manylinux_x86_64.Dockerfile"
# TODO: add linux_aarch64

- wheel_name: "mini-face-manylinux_2_28_aarch64"
architecture: "aarch64"
container: ".github/containers/manylinux_aarch64.Dockerfile"

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ manylinux-aarch64-image = "manylinux-aarch64:latest"
build-verbosity = 3

[tool.cibuildwheel.linux]
archs = ['x86_64'] # TODO: add aarch64
archs = ['x86_64', 'aarch64']

[tool.cibuildwheel.linux.environment]
VCPKG_INSTALLED = "$VCPKG_ROOT/installed/$VCPKG_DEFAULT_TRIPLET"
Expand Down
Loading