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

add manylinux2014 recipe #58

Closed
wants to merge 2 commits into from
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

# base packages for reinstall
[base]
name=CentOS-$releasever - Base
baseurl=https://archive.kernel.org/centos-vault/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://archive.kernel.org/centos-vault/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://archive.kernel.org/centos-vault/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://archive.kernel.org/centos-vault/7.9.2009/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[C7.9.2009-sclo]
name=CentOS-7.9.2009 - SCLO
baseurl=https://vault.centos.org/7.9.2009/sclo/$basearch/rh/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
enabled=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM centos:7.9.2009

COPY CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo

RUN yum update -y \
&& yum install -y \
bzip2 \
file \
git \
patch \
python3 \
vim \
gettext

COPY CentOS-SCL.repo /etc/yum.repos.d/CentOS-SCL.repo

RUN yum install -y centos-release-scl \
&& rm -f rm /etc/yum.repos.d/CentOS-SCLo*.repo \
&& yum install -y devtoolset-10

RUN rm -rf rm -f /lib64/libcrypt.so \
&& ldconfig -v

RUN python3 -m pip install boto3

ENV BOOTSTRAP_DIR=/usr/local/spack-tools

COPY /spack.yaml /spack.yaml.pre

RUN envsubst < spack.yaml.pre > spack.yaml \
&& rm spack.yaml.pre

RUN export S=/tmp/spack \
&& git clone https://github.com/spack/spack $S \
&& (cd $S && git checkout 4f9aa6004b4324bc819fcb25f4ed9acaa6cf11bc) \
&& . $S/share/spack/setup-env.sh \
&& export SPACK_DISABLE_LOCAL_CONFIG=1 \
&& spack config add 'config:build_stage:$spack/build_stage' \
&& spack config add "config:db_lock_timeout:360" \
&& spack config add "config:connect_timeout:60" \
&& spack mirror add bootstrap https://cache.e4s.io/spack-bootstrap/centos7-glibc2.17-libcrypt1/2024.11.20/pad256 \
&& spack buildcache keys -it \
&& spack -e . concretize -f | tee concretize.log \
&& spack -e . install --cache-only \
&& spack clean -a \
&& mv spack.yaml spack.lock concretize.log $BOOTSTRAP_DIR/ \
&& rm -rf $S .spack-env Makefile ~/.spack

RUN cd /tmp \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -rf awscliv2.zip aws

RUN echo source scl_source enable devtoolset-10 >> /etc/bashrc \
&& echo export PATH=$BOOTSTRAP_DIR/view/bin:'${PATH}' >> /etc/bashrc

ENV PATH=$BOOTSTRAP_DIR/view/bin:$PATH
ENV LC_ALL=en_US.UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash -e

BUILD_DATE=$(printf '%(%Y.%m.%d)T' -1)
BUILD_TAG=${BUILD_TAG:-${BUILD_DATE}}
BUILD_NAME=centos7-builder-amd64-gcc10.2.1-glibc2.17-libcrypt1

REGISTRY=${REGISTRY:-ghcr.io/spack/spack}
OUTPUT_IMAGE="${REGISTRY}/${BUILD_NAME}:${BUILD_TAG}"

docker build \
-t "${OUTPUT_IMAGE}" \
.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
spack:
view:
default:
root: $BOOTSTRAP_DIR/view
link: roots

config:
install_tree:
root: $BOOTSTRAP_DIR/install

concretizer:
reuse: true
unify: when_possible

packages:
all:
require: '%gcc target=x86_64'

specs:
- gmake
- gnupg
- libtree
- patchelf
- git
Loading