-
Notifications
You must be signed in to change notification settings - Fork 83
feat(core): Add support for building and running on musllinux_1_2; Add musllinux_1_2 dependency container images. #1054
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
Changes from 1 commit
06c7147
e4adcf6
889f97d
4998cd6
9b14097
4edace6
fb47ca2
55dc329
6be8932
1112b85
3c06cbf
56d3b92
bedf84e
7b29331
d34b315
c2c4a31
5eea5f1
987104c
8d2ed5d
873b9dc
33d85e5
2980a94
6d9286b
d3a7817
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| FROM quay.io/pypa/musllinux_1_2_aarch64 | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| WORKDIR /root | ||
|
|
||
| RUN mkdir -p ./tools/scripts/lib_install | ||
| COPY ./tools/scripts/lib_install ./tools/scripts/lib_install | ||
|
|
||
| RUN ./tools/scripts/lib_install/musllinux_1_2/install-all.sh | ||
|
|
||
| # Remove cached files | ||
| RUN apk cache clean && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* | ||
|
|
||
|
||
| # NOTE: Don't flatten the image or else we'll lose any environment modifications from the base | ||
| # image. | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
| component_root="${script_dir}/../../../" | ||
|
|
||
| build_cmd=( | ||
| docker buildx build | ||
| --platform linux/arm64 | ||
| --tag clp-core-dependencies-arm64-musllinux_1_2:dev | ||
| "$component_root" | ||
| --file "${script_dir}/Dockerfile" | ||
| --load | ||
| ) | ||
|
|
||
| if command -v git >/dev/null && git -C "$script_dir" rev-parse --is-inside-work-tree >/dev/null ; | ||
| then | ||
| build_cmd+=( | ||
| --label "org.opencontainers.image.revision=$(git -C "$script_dir" rev-parse HEAD)" | ||
| --label "org.opencontainers.image.source=$(git -C "$script_dir" remote get-url origin)" | ||
| ) | ||
| fi | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| echo "Running: ${build_cmd[*]}" | ||
| "${build_cmd[@]}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| FROM quay.io/pypa/musllinux_1_2_x86_64 | ||
|
||
|
|
||
| WORKDIR /root | ||
|
|
||
| RUN mkdir -p ./tools/scripts/lib_install | ||
| COPY ./tools/scripts/lib_install ./tools/scripts/lib_install | ||
|
|
||
| RUN ./tools/scripts/lib_install/musllinux_1_2/install-all.sh | ||
|
|
||
| # Remove cached files | ||
| RUN apk cache clean && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* | ||
jackluo923 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # NOTE: Don't flatten the image or else we'll lose any environment modifications from the base | ||
| # image. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
| script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
| component_root="${script_dir}/../../../" | ||
|
|
||
| build_cmd=( | ||
| docker buildx build | ||
| --platform linux/amd64 | ||
| --tag clp-core-dependencies-x86-musllinux_1_2:dev | ||
| "$component_root" | ||
| --file "${script_dir}/Dockerfile" | ||
| --load | ||
| ) | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| if command -v git >/dev/null && git -C "$script_dir" rev-parse --is-inside-work-tree >/dev/null ; | ||
| then | ||
| build_cmd+=( | ||
| --label "org.opencontainers.image.revision=$(git -C "$script_dir" rev-parse HEAD)" | ||
| --label "org.opencontainers.image.source=$(git -C "$script_dir" remote get-url origin)" | ||
| ) | ||
| fi | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| echo "Running: ${build_cmd[*]}" | ||
| "${build_cmd[@]}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
| script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
|
||
| "${script_dir}/install-prebuilt-packages.sh" | ||
| "${script_dir}/install-packages-from-source.sh" | ||
|
|
||
| # TODO: https://github.com/y-scope/clp/issues/795 | ||
| "${script_dir}/../check-cmake-version.sh" | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
| script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
| lib_install_scripts_dir="${script_dir}/.." | ||
|
|
||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # NOTE: The remaining installation scripts depend on boost, so we install it beforehand. | ||
| "${lib_install_scripts_dir}/install-boost.sh" 1.87.0 | ||
|
|
||
| # NOTE: | ||
| # 1. libarchive may statically link with LZMA, LZ4, and Zstandard, so we install them beforehand. | ||
| # 2. The versions of libarchive, LZMA, LZ4, and Zstandard available in manylinux_2_28's package | ||
jackluo923 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # repositories are either dated or don't include static libraries, so we install more recent | ||
| # versions from source. | ||
| "${lib_install_scripts_dir}/liblzma.sh" 5.8.1 | ||
| "${lib_install_scripts_dir}/lz4.sh" 1.10.0 | ||
| "${lib_install_scripts_dir}/zstandard.sh" 1.5.7 | ||
| "${lib_install_scripts_dir}/libarchive.sh" 3.8.0 | ||
|
|
||
| "${lib_install_scripts_dir}/msgpack.sh" 7.0.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
| apk update && apk add \ | ||
| openjdk11-jdk \ | ||
| jq \ | ||
| curl-dev \ | ||
| bzip2-dev \ | ||
| bzip2-static \ | ||
| mariadb-connector-c-dev \ | ||
| openssl-dev \ | ||
| zlib-dev \ | ||
| zlib-static | ||
jackluo923 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
jackluo923 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Install `task` | ||
| # NOTE: We lock `task` to a version < 3.43 to avoid https://github.com/y-scope/clp/issues/ | ||
jackluo923 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| VERSION=3.42.1 | ||
| ARCH=$(uname -m) | ||
jackluo923 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| case "$ARCH" in | ||
| x86_64) ARCH=amd64 ;; | ||
| aarch64) ARCH=arm64 ;; | ||
| *) echo "Unsupported architecture: $ARCH"; exit 1 ;; | ||
| esac | ||
|
|
||
| wget -O /tmp/task.tar.gz \ | ||
| "https://github.com/go-task/task/releases/download/v${VERSION}/task_linux_${ARCH}.tar.gz" | ||
|
|
||
| tar -C /usr/local/bin -xzf /tmp/task.tar.gz task | ||
| chmod +x /usr/local/bin/task | ||
| rm /tmp/task.tar.gz | ||
jackluo923 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
jackluo923 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Downgrade to CMake v3 to work around https://github.com/y-scope/clp/issues/795 | ||
| pipx uninstall cmake | ||
| pipx install cmake~=3.31 | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.