Skip to content
Merged
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
29 changes: 7 additions & 22 deletions packages/default/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,21 @@ RUN gcc --version
RUN python3.12 -m venv /venv && \
. /venv/bin/activate && \
python3.12 -m pip install --upgrade pip && \
python3.12 -m pip install wheel auditwheel Cython numpy build setuptools setuptools_scm && \
python3.12 -m pip install wheel==0.45.1 auditwheel==6.2.0 Cython==3.0.12 numpy==2.2.4 build==1.2.2 setuptools==75.8.2 setuptools_scm==8.2.0 && \
python3.12 -m pip wheel --verbose --no-cache-dir ${PACKAGE_NAME}==${PACKAGE_VERSION} ${PACKAGE_NAME} --no-deps -w /tmp/wheels

RUN ls -l /tmp/wheels

RUN mkdir -p /built_wheels

# Show the contents of the wheels using auditwheel
# Repair the wheels using auditwheel
RUN for whl in /tmp/wheels/*.whl; do \
echo "Checking wheel $whl" && \
if ! auditwheel show "$whl" 2>&1 | grep -q "platform wheel"; then \
echo "Repairing wheel $whl"; \
auditwheel repair "$whl" -w /built_wheels; \
auditwheel show /built_wheels/*.whl; \
else \
echo "Copying wheel without repair since not a platform wheel $whl"; \
cp "$whl" /built_wheels/; \
fi \
done

# List the contents of the /wheels directory
RUN ls -l /built_wheels
# Conditionally repair wheels (platform wheels get repaired, pure-Python copied as-is)
COPY packages/scripts/repair-wheels.sh /repair-wheels.sh
RUN /repair-wheels.sh /tmp/wheels /built_wheels


# Use a Python slim Debian image for testing
FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} AS tester

# Copy the built wheels and test script from the builder stage
COPY --from=builder /wheels /wheels
COPY --from=builder /built_wheels /wheels

# Install runtime dependencies required by the application
RUN apt-get update && apt-get install -y \
Expand All @@ -89,10 +74,10 @@ RUN apt-get update && apt-get install -y \
RUN pip -vvv install /wheels/*.whl

# Use an Alpine image for the final stage
FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

# Copy the built wheels and Arrow source code from the builder stage
COPY --from=builder /wheels /wheels
COPY --from=builder /built_wheels /wheels

# List the contents of the /wheels directory
RUN ls -l /wheels
25 changes: 5 additions & 20 deletions packages/default/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,14 @@ RUN apk update && apk add --no-cache \
RUN python3 -m venv /venv && \
. /venv/bin/activate && \
pip install --upgrade pip && \
pip install wheel auditwheel Cython numpy build setuptools setuptools_scm && \
pip install wheel==0.45.1 auditwheel==6.2.0 Cython==3.0.12 numpy==2.2.4 build==1.2.2 setuptools==75.8.2 setuptools_scm==8.2.0 && \
pip wheel --verbose --no-cache-dir ${PACKAGE_NAME}==${PACKAGE_VERSION} ${PACKAGE_NAME} --no-deps -w /tmp/wheels

RUN ls -l /tmp/wheels

RUN mkdir -p /built_wheels

# Show the contents of the wheels using auditwheel
# Repair the wheels using auditwheel
RUN for whl in /tmp/wheels/*.whl; do \
echo "Checking wheel $whl" && \
if ! auditwheel show "$whl" 2>&1 | grep -q "platform wheel"; then \
echo "Repairing wheel $whl"; \
auditwheel repair "$whl" -w /built_wheels; \
auditwheel show /built_wheels/*.whl; \
else \
echo "Copying wheel without repair since not a platform wheel $whl"; \
cp "$whl" /built_wheels/; \
fi \
done

# List the contents of the /wheels directory
RUN ls -l /wheels
# Conditionally repair wheels (platform wheels get repaired, pure-Python copied as-is)
COPY packages/scripts/repair-wheels.sh /repair-wheels.sh
RUN /repair-wheels.sh /tmp/wheels /built_wheels

# Use a Python Alpine image for testing
FROM public.ecr.aws/docker/library/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} AS tester
Expand All @@ -107,7 +92,7 @@ RUN apk update && apk add --no-cache curl libstdc++ libffi git lz4-dev snappy
RUN pip -vvv install /wheels/*.whl

# Use an Alpine image for the final stage
FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

# Copy the built wheels and Arrow source code from the builder stage
COPY --from=builder /built_wheels /wheels
Expand Down
11 changes: 6 additions & 5 deletions packages/google-crc32c/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
ARG PYTHON_VERSION=3.12
ARG ALPINE_VERSION=3.20
ARG DEBIAN_VERSION=bookworm

FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} AS builder

# Update pip
RUN pip install --upgrade pip

# Install repairwheel
RUN pip install repairwheel
# Install auditwheel for manylinux wheel repair
RUN pip install auditwheel patchelf

# Build wheels for the specified version
ARG PACKAGE_NAME
Expand All @@ -17,12 +18,12 @@ RUN pip wheel --verbose --no-cache-dir ${PACKAGE_NAME}==${PACKAGE_VERSION} --no-
# List the contents of the /wheels directory to verify the build
RUN ls -l /tmp/wheels_temp

# https://github.com/jvolkman/repairwheel
RUN repairwheel /tmp/wheels_temp/*.whl -o /wheels
# Repair wheels for manylinux compatibility
RUN auditwheel repair /tmp/wheels_temp/*.whl -w /wheels

RUN ls -l /wheels


FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

COPY --from=builder /wheels /wheels
4 changes: 2 additions & 2 deletions packages/google-crc32c/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ENV CRC32C_PURE_PYTHON=False
RUN pip install --upgrade pip

# Install repairwheel
RUN pip install repairwheel
RUN pip install repairwheel==0.6.2

# Build wheels for the specified version
ARG PACKAGE_NAME
Expand All @@ -32,6 +32,6 @@ RUN repairwheel /tmp/wheels_temp/*.whl -o /wheels
RUN ls -l /wheels


FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

COPY --from=builder /wheels /wheels
11 changes: 6 additions & 5 deletions packages/grpcio/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG PYTHON_VERSION=3.12
ARG ALPINE_VERSION=3.20
ARG DEBIAN_VERSION=bookworm

FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} AS builder
Expand All @@ -11,8 +12,8 @@ RUN apt-get update && apt-get install -y \
# Update pip
RUN pip install --upgrade pip

# Install repairwheel
RUN pip install repairwheel
# Install auditwheel for manylinux wheel repair
RUN pip install auditwheel patchelf

# Build wheels for the specified version
ARG PACKAGE_NAME
Expand All @@ -22,12 +23,12 @@ RUN pip wheel --verbose --no-cache-dir ${PACKAGE_NAME}==${PACKAGE_VERSION} --no-
# List the contents of the /wheels directory to verify the build
RUN ls -l /tmp/wheels_temp

# https://github.com/jvolkman/repairwheel
RUN repairwheel /tmp/wheels_temp/*.whl -o /wheels
# Repair wheels for manylinux compatibility
RUN auditwheel repair /tmp/wheels_temp/*.whl -w /wheels

RUN ls -l /wheels


FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

COPY --from=builder /wheels /wheels
4 changes: 2 additions & 2 deletions packages/grpcio/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN echo "https://mirror.leaseweb.com/alpine/edge/community" >> /etc/apk/reposit
RUN pip install --upgrade pip

# Install repairwheel
RUN pip install repairwheel
RUN pip install repairwheel==0.6.2

# Build wheels for the specified version
ARG PACKAGE_NAME
Expand All @@ -31,6 +31,6 @@ RUN repairwheel /tmp/wheels_temp/*.whl -o /wheels
RUN ls -l /wheels


FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

COPY --from=builder /wheels /wheels
4 changes: 2 additions & 2 deletions packages/numpy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN gcc --version
RUN python3.12 -m venv /venv && \
. /venv/bin/activate && \
python3.12 -m pip install --upgrade pip && \
python3.12 -m pip install wheel auditwheel Cython numpy build setuptools setuptools_scm && \
python3.12 -m pip install wheel==0.45.1 auditwheel==6.2.0 Cython==3.0.12 numpy==2.2.4 build==1.2.2 setuptools==75.8.2 setuptools_scm==8.2.0 && \
python3.12 -m pip wheel --verbose --no-cache-dir ${PACKAGE_NAME}==${PACKAGE_VERSION} --no-binary ${PACKAGE_NAME} --no-deps -w /tmp/wheels

RUN ls -l /tmp/wheels
Expand Down Expand Up @@ -90,7 +90,7 @@ RUN apt-get update && apt-get install -y \
RUN pip -vvv install /wheels/*.whl

# Use an Alpine image for the final stage
FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

# Copy the built wheels and Arrow source code from the builder stage
COPY --from=builder /wheels /wheels
Expand Down
4 changes: 2 additions & 2 deletions packages/numpy/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ENV LAPACK=/usr/lib/libopenblas.so
RUN python3 -m venv /venv && \
. /venv/bin/activate && \
pip install --upgrade pip && \
pip install wheel auditwheel Cython numpy build setuptools setuptools_scm && \
pip install wheel==0.45.1 auditwheel==6.2.0 Cython==3.0.12 numpy==2.2.4 build==1.2.2 setuptools==75.8.2 setuptools_scm==8.2.0 && \
pip wheel --verbose --no-cache-dir ${PACKAGE_NAME}==${PACKAGE_VERSION} --no-binary ${PACKAGE_NAME} --no-deps -w /tmp/wheels

RUN ls -l /tmp/wheels
Expand Down Expand Up @@ -106,7 +106,7 @@ RUN apk update && apk add --no-cache curl libstdc++ libffi git lz4-dev snappy
RUN pip -vvv install /wheels/*.whl

# Use an Alpine image for the final stage
FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

# Copy the built wheels and Arrow source code from the builder stage
COPY --from=builder /wheels /wheels
Expand Down
23 changes: 4 additions & 19 deletions packages/playwright/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,14 @@ RUN gcc --version
RUN python3.12 -m venv /venv && \
. /venv/bin/activate && \
python3.12 -m pip install --upgrade pip && \
python3.12 -m pip install wheel auditwheel Cython numpy build setuptools setuptools_scm && \
python3.12 -m pip install wheel==0.45.1 auditwheel==6.2.0 Cython==3.0.12 numpy==2.2.4 build==1.2.2 setuptools==75.8.2 setuptools_scm==8.2.0 && \
python3.12 -m pip wheel --verbose --no-cache-dir ${PACKAGE_NAME}==${PACKAGE_VERSION} ${PACKAGE_NAME} --no-deps -w /tmp/wheels

RUN ls -l /tmp/wheels

RUN mkdir -p /built_wheels

# Show the contents of the wheels using auditwheel
# Repair the wheels using auditwheel
RUN for whl in /tmp/wheels/*.whl; do \
echo "Checking wheel $whl" && \
if ! auditwheel show "$whl" 2>&1 | grep -q "platform wheel"; then \
echo "Repairing wheel $whl"; \
auditwheel repair "$whl" -w /built_wheels; \
auditwheel show /built_wheels/*.whl; \
else \
echo "Copying wheel without repair since not a platform wheel $whl"; \
cp "$whl" /built_wheels/; \
fi \
done

# List the contents of the /wheels directory
RUN ls -l /built_wheels
# Conditionally repair wheels (platform wheels get repaired, pure-Python copied as-is)
COPY packages/scripts/repair-wheels.sh /repair-wheels.sh
RUN /repair-wheels.sh /tmp/wheels /built_wheels

# Use a Python slim Debian image for testing
FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} AS tester
Expand Down
23 changes: 4 additions & 19 deletions packages/playwright/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,14 @@ WORKDIR /build/${PACKAGE_NAME}
RUN python3 -m venv /venv && \
. /venv/bin/activate && \
pip install --upgrade pip && \
pip install wheel auditwheel Cython numpy build setuptools setuptools_scm && \
pip install wheel==0.45.1 auditwheel==6.2.0 Cython==3.0.12 numpy==2.2.4 build==1.2.2 setuptools==75.8.2 setuptools_scm==8.2.0 && \
python -m build --wheel --outdir /tmp/wheels .

RUN ls -l /tmp/wheels

RUN mkdir -p /built_wheels

# Show the contents of the wheels using auditwheel
# Repair the wheels using auditwheel
RUN for whl in /tmp/wheels/*.whl; do \
echo "Checking wheel $whl" && \
if ! auditwheel show "$whl" 2>&1 | grep -q "platform wheel"; then \
echo "Repairing wheel $whl"; \
auditwheel repair "$whl" -w /built_wheels; \
auditwheel show /built_wheels/*.whl; \
else \
echo "Copying wheel without repair since not a platform wheel $whl"; \
cp "$whl" /built_wheels/; \
fi \
done

# List the contents of the /wheels directory
RUN ls -l /built_wheels
# Conditionally repair wheels (platform wheels get repaired, pure-Python copied as-is)
COPY packages/scripts/repair-wheels.sh /repair-wheels.sh
RUN /repair-wheels.sh /tmp/wheels /built_wheels

# Use a Python Alpine image for testing
FROM public.ecr.aws/docker/library/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} AS tester
Expand Down
10 changes: 5 additions & 5 deletions packages/pyarrow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ ENV ARROW_HOME=/usr/local \
ARROW_VERSION=${PACKAGE_VERSION} \
VERSION=${PACKAGE_VERSION}

# Download and extract Apache Arrow source code
# Download and extract Apache Arrow source code with checksum verification
RUN mkdir /arrow \
&& curl -L https://github.com/apache/arrow/archive/refs/tags/apache-arrow-${PACKAGE_VERSION}.tar.gz -o /arrow/apache-arrow-${PACKAGE_VERSION}.tar.gz \
&& echo "${ARROW_SHA256} /arrow/apache-arrow-${PACKAGE_VERSION}.tar.gz" | sha256sum -c - \
&& tar -xzf /arrow/apache-arrow-${PACKAGE_VERSION}.tar.gz -C /arrow --strip-components=1

# Create build directory for Arrow
Expand Down Expand Up @@ -97,7 +98,7 @@ RUN ls -halt /arrow
RUN python3.12 -m venv /venv && \
. /venv/bin/activate && \
python3.12 -m pip install --upgrade pip && \
python3.12 -m pip install wheel auditwheel Cython numpy build setuptools>=59.6.0 setuptools_scm>=8.1.0 && \
python3.12 -m pip install wheel==0.45.1 auditwheel==6.2.0 Cython==3.0.12 numpy==2.2.4 build==1.2.2 setuptools==75.8.2 setuptools_scm==8.2.0 && \
cd /arrow/python && \
python3.12 setup.py build_ext --build-type=release --bundle-arrow-cpp bdist_wheel

Expand Down Expand Up @@ -146,11 +147,10 @@ RUN pip -vvv install /wheels/*.whl
RUN python /test_pyarrow.py

# Use an Alpine image for the final stage
FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

# Copy the built wheels and Arrow source code from the builder stage
# Copy the built wheels from the builder stage
COPY --from=builder /wheels /wheels
COPY --from=builder /arrow /arrow

# List the contents of the /wheels directory
RUN ls -l /wheels
10 changes: 5 additions & 5 deletions packages/pyarrow/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ ENV ARROW_HOME=/usr/local \
ARROW_VERSION=${PACKAGE_VERSION} \
VERSION=${PACKAGE_VERSION}

# Download and extract Apache Arrow source code
# Download and extract Apache Arrow source code with checksum verification
RUN mkdir /arrow \
&& curl -L https://github.com/apache/arrow/archive/refs/tags/apache-arrow-${PACKAGE_VERSION}.tar.gz -o /arrow/apache-arrow-${PACKAGE_VERSION}.tar.gz \
&& echo "${ARROW_SHA256} /arrow/apache-arrow-${PACKAGE_VERSION}.tar.gz" | sha256sum -c - \
&& tar -xzf /arrow/apache-arrow-${PACKAGE_VERSION}.tar.gz -C /arrow --strip-components=1

# Create build directory for Arrow
Expand Down Expand Up @@ -117,7 +118,7 @@ RUN ls -halt /arrow
RUN python3 -m venv /venv && \
. /venv/bin/activate && \
pip install --upgrade pip && \
pip install repairwheel wheel auditwheel Cython numpy build setuptools setuptools_scm && \
pip install repairwheel==0.6.2 wheel==0.45.1 auditwheel==6.2.0 Cython==3.0.12 numpy==2.2.4 build==1.2.2 setuptools==75.8.2 setuptools_scm==8.2.0 && \
cd /arrow/python && \
python setup.py build_ext --build-type=release --bundle-arrow-cpp bdist_wheel

Expand Down Expand Up @@ -159,11 +160,10 @@ RUN pip -vvv install /wheels/*.whl
RUN python /test_pyarrow.py

# Use an Alpine image for the final stage
FROM alpine:3.20.3
FROM alpine:${ALPINE_VERSION}

# Copy the built wheels and Arrow source code from the builder stage
# Copy the built wheels from the builder stage
COPY --from=builder /wheels /wheels
COPY --from=builder /arrow /arrow

# List the contents of the /wheels directory
RUN ls -l /wheels
Loading
Loading