Skip to content

Commit

Permalink
update docker images, FindSnappy
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmuhs committed Oct 20, 2024
1 parent 0677d02 commit 97d8c2e
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 130 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/python-dockerimages-cibuildwheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python docker cibuildwheel

on:
push:
branches: [ master, release-* ]
paths:
- 'docker/*/Dockerfile'
pull_request:
branches: [ master ]
#paths:
#- 'docker/*/Dockerfile'
workflow_dispatch:

jobs:
build_docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push manylinux docker image
uses: docker/build-push-action@v6
with:
file: docker/manylinux-builder/Dockerfile
push: true
#push: ${{ github.event_name != 'pull_request' }}
build-args: |
- baseimage="quay.io/pypa/manylinux_2_28_x86_64"
tags: keyvidev/manylinux-builder-x86_64
20 changes: 10 additions & 10 deletions cmake_modules/FindSnappy.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Snappy, a fast compressor/decompressor

include(LibFindMacros)
find_path(Snappy_INCLUDE_DIR NAMES snappy.h)

find_path(Snappy_INCLUDE_DIR
NAMES snappy.h
)
find_library(Snappy_LIBRARY NAMES snappy)

find_library(Snappy_LIBRARY
NAMES snappy
)
include(SelectLibraryConfigurations)
SELECT_LIBRARY_CONFIGURATIONS(SNAPPY)

set(Snappy_PROCESS_INCLUDES Snappy_INCLUDE_DIR)
set(Snappy_PROCESS_LIBS Snappy_LIBRARY)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
Snappy DEFAULT_MSG
Snappy_LIBRARY Snappy_INCLUDE_DIR
)

libfind_process(Snappy)
mark_as_advanced(Snappy_INCLUDE_DIR Snappy_LIBRARY)
103 changes: 0 additions & 103 deletions cmake_modules/LibFindMacros.cmake

This file was deleted.

21 changes: 9 additions & 12 deletions docker/manylinux-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ RUN \
if which yum; then \
yum -y update && \
yum clean all && \
yum -y install bzip2-devel snappy-devel python-devel && \
if [ $AUDITWHEEL_ARCH != "aarch64" ]; then \
yum -y install hiredis-devel libzstd-devel; \
fi && \
yum -y install bzip2-devel snappy-devel xxhash-devel libzstd-devel python3-devel && \
yum clean all; \
elif which apk; then \
apk upgrade --no-cache && \
Expand All @@ -18,12 +15,12 @@ RUN \
exit 1; \
fi

ENV ZLIB_MAJOR=1 ZLIB_MINOR=3
ENV ZLIB_MAJOR=1 ZLIB_MINOR=3 ZLIB_PATCH=1

RUN curl https://zlib.net/zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.tar.gz --output zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.tar.gz && \
tar -xvf zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.tar.gz && \
cd zlib-${ZLIB_MAJOR}.${ZLIB_MINOR} && ./configure && make -j`nproc` && make install && \
cd .. && rm -rf zlib-${ZLIB_MAJOR}.${ZLIB_MINOR} zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.tar.gz
RUN curl https://zlib.net/zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}.tar.gz --output zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}.tar.gz && \
tar -xvf zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}.tar.gz && \
cd zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH} && ./configure && make -j`nproc` && make install && \
cd .. && rm -rf zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH} zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}.tar.gz

ENV BOOST_MAJOR=1 BOOST_MINOR=83 BOOST_PATCH=0
ENV BOOST_URL="https://boostorg.jfrog.io/artifactory/main/release/${BOOST_MAJOR}.${BOOST_MINOR}.${BOOST_PATCH}/source/boost_${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH}.tar.gz"
Expand All @@ -44,14 +41,14 @@ RUN curl -sSL https://cmake.org/files/v${CMAKE_MAJOR}.${CMAKE_MINOR}/cmake-${CMA
cd cmake-${CMAKE_MAJOR}.${CMAKE_MINOR}.${CMAKE_PATCH} && ./bootstrap --parallel=`nproc` -- -DCMAKE_USE_OPENSSL=OFF && make -j`nproc` && make install && \
cd .. && rm -rf cmake-${CMAKE_MAJOR}.${CMAKE_MINOR}.${CMAKE_PATCH}

ENV CCACHE_MAJOR=4 CCACHE_MINOR=8 CCACHE_PATCH=3
ENV CCACHE_MAJOR=4 CCACHE_MINOR=10 CCACHE_PATCH=2

RUN \
if [ $AUDITWHEEL_ARCH == "aarch64" ] && [ $AUDITWHEEL_POLICY == "manylinux2014" ]; then \
echo "skiping ccache, not available for this platform"; \
else \
curl -sSL https://github.com/ccache/ccache/archive/refs/tags/v${CCACHE_MAJOR}.${CCACHE_MINOR}.${CCACHE_PATCH}.tar.gz | tar -xz && \
cd ccache-${CCACHE_MAJOR}.${CCACHE_MINOR}.${CCACHE_PATCH} && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -j`nproc` && make install && \
cd ccache-${CCACHE_MAJOR}.${CCACHE_MINOR}.${CCACHE_PATCH} && mkdir build && cd build && cmake -D ENABLE_TESTING=OFF -D REDIS_STORAGE_BACKEND=OFF -D CMAKE_BUILD_TYPE=Release .. && make -j`nproc` && make install && \
cd ../.. && rm -rf ccache-${CCACHE_MAJOR}.${CCACHE_MINOR}.${CCACHE_PATCH}; \
fi

Expand All @@ -60,4 +57,4 @@ RUN ln -s /usr/local/bin/ccache /usr/local/bin/gcc && \
ln -s /usr/local/bin/ccache /usr/local/bin/cc && \
ln -s /usr/local/bin/ccache /usr/local/bin/c++ && \
ln -s /usr/local/bin/ccache /usr/local/bin/clang && \
ln -s /usr/local/bin/ccache /usr/local/bin/clang++
ln -s /usr/local/bin/ccache /usr/local/bin/clang++
10 changes: 5 additions & 5 deletions docker/manylinux-builder/build_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

set -euxo pipefail

docker build . \
-f Dockerfile \
--build-arg base_image="quay.io/pypa/manylinux2014_x86_64" \
-t keyvidev/manylinux-builder-x86_64
#docker build . \
# -f Dockerfile \
# --build-arg base_image="quay.io/pypa/manylinux_2_28_x86_64" \
# -t keyvidev/manylinux-builder-x86_64

docker build . \
-f Dockerfile \
--build-arg base_image="quay.io/pypa/manylinux2014_aarch64" \
--build-arg base_image="quay.io/pypa/manylinux_2_28_aarch64" \
-t keyvidev/manylinux-builder-aarch64

docker build . \
Expand Down

0 comments on commit 97d8c2e

Please sign in to comment.