Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
haampie committed May 6, 2024
1 parent fb7e9a5 commit 48ce30c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 28 deletions.
7 changes: 2 additions & 5 deletions clingo/Dockerfile.manylinux2014
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ ENV SPACK_PYTHON=/opt/python/cp311-cp311/bin/python
ENV PATH="/root/spack/bin:${PATH}"
WORKDIR /root

# Clone the repo and install Spack
RUN git clone https://github.com/spack/spack.git && \
git -C spack checkout -b docker-reference 9b4ca0be40edb02115be94bbc428ac546d63030e

# Set externals, locate compilers
RUN spack external find -j 1 --not-buildable bison cmake
RUN spack compiler find
RUN spack config add config:concretizer:original
Expand All @@ -28,5 +25,5 @@ RUN ./bootstrap_clingo2014.sh 310
RUN ./bootstrap_clingo2014.sh 311
RUN ./bootstrap_clingo2014.sh 312

COPY clingo/scripts/create_binary_mirror.sh /root/create_binary_mirror.sh
RUN ./create_binary_mirror.sh
RUN mkdir -p /root/binary-mirror \
spack buildcache push --unsigned --force /root/binary-mirror $(spack find --format="/{hash}" clingo-bootstrap)
6 changes: 3 additions & 3 deletions clingo/scripts/copy_mirror_manylinux2014.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

id=$(docker create --platform linux/amd64 ${SPACK_MANYLINUX2014_TAG})
mkdir amd64
docker cp $id:/home/spack/binary-mirror amd64/binary-mirror
docker cp $id:/root/binary-mirror amd64/binary-mirror
docker rm -v $id

id=$(docker create --platform linux/arm64 ${SPACK_MANYLINUX2014_TAG})
mkdir arm64
docker cp $id:/home/spack/binary-mirror arm64/binary-mirror
docker cp $id:/root/binary-mirror arm64/binary-mirror
docker rm -v $id

id=$(docker create --platform linux/ppc64le ${SPACK_MANYLINUX2014_TAG})
mkdir ppc64le
docker cp $id:/home/spack/binary-mirror ppc64le/binary-mirror
docker cp $id:/root/binary-mirror ppc64le/binary-mirror
docker rm -v $id

# Unify the mirrors. This is required since the upload-artifacts action
Expand Down
4 changes: 2 additions & 2 deletions clingo/scripts/create_binary_mirror.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

specs=$(${SPACK_CMD} find --format="/{hash}" clingo-bootstrap)
specs=$(spack find --format="/{hash}" clingo-bootstrap)
mkdir -p /home/spack/binary-mirror
${SPACK_CMD} buildcache push --unsigned --force /home/spack/binary-mirror ${specs}
spack buildcache push --unsigned --force /home/spack/binary-mirror ${specs}
10 changes: 3 additions & 7 deletions gnupg/Dockerfile.manylinux2014
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ ENV SPACK_PYTHON="/opt/python/cp311-cp311/bin/python"
ENV PATH="/root/spack/bin:${PATH}"
WORKDIR /root

# Clone the repo and install Spack
RUN git clone https://github.com/spack/spack.git && \
git -C spack checkout -b docker-reference 9b4ca0be40edb02115be94bbc428ac546d63030e

# Set externals, locate compilers
RUN spack external find --not-buildable gawk perl
RUN spack compiler find

RUN spack config add config:install_tree:padded_length:256
RUN spack python -c "import archspec.cpu;print(archspec.cpu.host().family)" > target.txt
RUN spack -c config:install_tree:padded_length:256 install gnupg "target=$(cat target.txt)"

RUN spack -c install gnupg "target=$(cat target.txt)"
RUN mkdir -p /home/spack/binary-mirror && \
spack -c config:install_tree:padded_length:256 buildcache push --unsigned --force /home/spack/binary-mirror gnupg "target=$(cat target.txt)"
spack -c buildcache push --unsigned --force /home/spack/binary-mirror gnupg "target=$(cat target.txt)"
6 changes: 3 additions & 3 deletions gnupg/scripts/copy_mirror_manylinux2014.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

id=$(docker create --platform linux/amd64 ${SPACK_MANYLINUX2014_TAG})
mkdir amd64
docker cp $id:/home/spack/binary-mirror amd64/binary-mirror
docker cp $id:/root/binary-mirror amd64/binary-mirror
docker rm -v $id

id=$(docker create --platform linux/arm64 ${SPACK_MANYLINUX2014_TAG})
mkdir arm64
docker cp $id:/home/spack/binary-mirror arm64/binary-mirror
docker cp $id:/root/binary-mirror arm64/binary-mirror
docker rm -v $id

id=$(docker create --platform linux/ppc64le ${SPACK_MANYLINUX2014_TAG})
mkdir ppc64le
docker cp $id:/home/spack/binary-mirror ppc64le/binary-mirror
docker cp $id:/root/binary-mirror ppc64le/binary-mirror
docker rm -v $id

# Unify the two mirrors. This is required since the upload-artifacts action
Expand Down
5 changes: 0 additions & 5 deletions patchelf/Dockerfile.manylinux2014
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ ENV SPACK_PYTHON=/opt/python/cp311-cp311/bin/python
ENV PATH="/root/spack/bin:${PATH}"
WORKDIR /root

# Clone the repo and install Spack
RUN git clone https://github.com/spack/spack.git && \
git -C spack checkout -b docker-reference 9b4ca0be40edb02115be94bbc428ac546d63030e

# Set externals, locate compilers
RUN spack external find --not-buildable cmake
RUN spack compiler find

RUN spack python -c "import archspec.cpu;print(archspec.cpu.host().family)" > target.txt
RUN spack -c config:install_tree:padded_length:256 install patchelf "ldflags=-static-libstdc++ -static-libgcc" "target=$(cat target.txt)"

RUN mkdir -p /root/binary-mirror && \
spack -c config:install_tree:padded_length:256 buildcache push --unsigned --force /root/binary-mirror patchelf
6 changes: 3 additions & 3 deletions patchelf/scripts/copy_mirror_manylinux2014.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

id=$(docker create --platform linux/amd64 ${SPACK_MANYLINUX2014_TAG})
mkdir amd64
docker cp $id:/home/spack/binary-mirror amd64/binary-mirror
docker cp $id:/root/binary-mirror amd64/binary-mirror
docker rm -v $id

id=$(docker create --platform linux/arm64 ${SPACK_MANYLINUX2014_TAG})
mkdir arm64
docker cp $id:/home/spack/binary-mirror arm64/binary-mirror
docker cp $id:/root/binary-mirror arm64/binary-mirror
docker rm -v $id

id=$(docker create --platform linux/ppc64le ${SPACK_MANYLINUX2014_TAG})
mkdir ppc64le
docker cp $id:/home/spack/binary-mirror ppc64le/binary-mirror
docker cp $id:/root/binary-mirror ppc64le/binary-mirror
docker rm -v $id

# Unify the two mirrors. This is required since the upload-artifacts action
Expand Down

0 comments on commit 48ce30c

Please sign in to comment.