|
| 1 | +# Minimal manylinux-compatible Docker image for ARMv7l (32-bit ARM) |
| 2 | +# Based on Debian Bookworm for broad compatibility |
| 3 | + |
| 4 | +FROM arm32v7/debian:bookworm |
| 5 | + |
| 6 | +LABEL maintainer="Espressif Systems" |
| 7 | +LABEL description="Minimal manylinux-compatible environment for building Python wheels on ARMv7l" |
| 8 | + |
| 9 | +# Set environment variables |
| 10 | +ENV DEBIAN_FRONTEND=noninteractive \ |
| 11 | + LC_ALL=C.UTF-8 \ |
| 12 | + LANG=C.UTF-8 |
| 13 | + |
| 14 | +# Install build dependencies and Python versions |
| 15 | +RUN apt-get update && apt-get install -y \ |
| 16 | + # Build essentials |
| 17 | + build-essential \ |
| 18 | + gcc \ |
| 19 | + g++ \ |
| 20 | + make \ |
| 21 | + cmake \ |
| 22 | + git \ |
| 23 | + wget \ |
| 24 | + curl \ |
| 25 | + ca-certificates \ |
| 26 | + patchelf \ |
| 27 | + # Python build dependencies |
| 28 | + libssl-dev \ |
| 29 | + libffi-dev \ |
| 30 | + libbz2-dev \ |
| 31 | + libreadline-dev \ |
| 32 | + libsqlite3-dev \ |
| 33 | + libncurses5-dev \ |
| 34 | + libncursesw5-dev \ |
| 35 | + libgdbm-dev \ |
| 36 | + liblzma-dev \ |
| 37 | + tk-dev \ |
| 38 | + zlib1g-dev \ |
| 39 | + # Additional libraries commonly needed for wheels |
| 40 | + libxml2-dev \ |
| 41 | + libxslt1-dev \ |
| 42 | + libyaml-dev \ |
| 43 | + libglib2.0-dev \ |
| 44 | + # PyGObject dependencies |
| 45 | + libcairo2-dev \ |
| 46 | + pkg-config \ |
| 47 | + libgirepository1.0-dev \ |
| 48 | + # dbus-python dependencies |
| 49 | + libdbus-1-dev \ |
| 50 | + libdbus-glib-1-dev \ |
| 51 | + # Pillow dependencies |
| 52 | + libjpeg-dev \ |
| 53 | + libpng-dev \ |
| 54 | + libtiff-dev \ |
| 55 | + libfreetype6-dev \ |
| 56 | + liblcms2-dev \ |
| 57 | + libwebp-dev \ |
| 58 | + libopenjp2-7-dev \ |
| 59 | + libfribidi-dev \ |
| 60 | + libharfbuzz-dev \ |
| 61 | + libxcb1-dev \ |
| 62 | + libxau-dev \ |
| 63 | + brotli \ |
| 64 | + libbrotli-dev \ |
| 65 | + # Python from Debian repos (Bookworm provides 3.11) |
| 66 | + python3 \ |
| 67 | + python3-dev \ |
| 68 | + python3-venv \ |
| 69 | + python3-pip \ |
| 70 | + && rm -rf /var/lib/apt/lists/* |
| 71 | + |
| 72 | +# Install pip and wheel tools |
| 73 | +# --break-system-packages is OK because it is docker image and not a system |
| 74 | +RUN python3 -m pip install --no-cache-dir --break-system-packages --upgrade \ |
| 75 | + pip \ |
| 76 | + setuptools \ |
| 77 | + wheel \ |
| 78 | + auditwheel |
| 79 | + |
| 80 | +# Set up manylinux platform tag |
| 81 | +# This makes auditwheel recognize the environment as manylinux-compatible |
| 82 | +# Bookworm has glibc 2.36, so we use manylinux_2_35 |
| 83 | +RUN echo "manylinux_2_35_armv7l" > /etc/system-release-cpe |
| 84 | + |
| 85 | +# Create a marker file for manylinux detection |
| 86 | +RUN mkdir -p /opt/python && \ |
| 87 | + echo "manylinux_2_35_armv7l" > /opt/python/PLATFORM |
| 88 | + |
| 89 | +# Set working directory |
| 90 | +WORKDIR /workspace |
| 91 | + |
| 92 | +# Default Python |
| 93 | +ENV PATH="/usr/bin:${PATH}" |
| 94 | + |
| 95 | +CMD ["/bin/bash"] |
0 commit comments