-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update bootstrap buildcache for SC release (#24)
- Loading branch information
Showing
12 changed files
with
118 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,37 @@ | ||
FROM ghcr.io/spack/manylinux2014:v2022-10-25 | ||
FROM ghcr.io/spack/manylinux2014:v2023-10-03 | ||
|
||
RUN cd /opt/_internal && tar xvf static-libs-for-embedding-only.tar.xz && cd - | ||
|
||
RUN adduser -m spack | ||
|
||
# Switch to a non-root user | ||
USER spack | ||
ENV SPACK_CMD="/opt/python/cp39-cp39/bin/python /home/spack/spack/bin/spack" | ||
ENV SPACK_CMD="/opt/python/cp311-cp311/bin/python /home/spack/spack/bin/spack" | ||
WORKDIR /home/spack | ||
|
||
# Clone the repo and install Spack | ||
RUN git clone https://www.github.com/spack/spack.git | ||
|
||
# Run a script to build all the versions of clingo we could | ||
COPY --chown=spack:spack clingo/scripts/bootstrap_clingo_manylinux2014.sh /home/spack/bootstrap_clingo2014.sh | ||
COPY --chown=spack:spack clingo/scripts/install_clingo.py /home/spack/install_clingo.py | ||
COPY --chown=spack:spack clingo/scripts/create_binary_mirror.sh /home/spack/create_binary_mirror.sh | ||
RUN git clone https://www.github.com/spack/spack.git && \ | ||
cd spack && \ | ||
git checkout -b docker-reference 08da9a854a53542e1f71d30ed8d14d6b7d18119f && \ | ||
cd .. | ||
|
||
# Set externals, locate compilers | ||
RUN ${SPACK_CMD} external find --not-buildable bison | ||
RUN ${SPACK_CMD} external find -j 1 --not-buildable bison cmake | ||
RUN ${SPACK_CMD} compiler find | ||
RUN ${SPACK_CMD} config add "config:concretizer:original" | ||
RUN ${SPACK_CMD} config add "config:install_tree:padded_length:256" | ||
|
||
# Run a script to build all the versions of clingo we could | ||
COPY --chown=spack:spack clingo/scripts/bootstrap_clingo_manylinux2014.sh /home/spack/bootstrap_clingo2014.sh | ||
COPY --chown=spack:spack clingo/scripts/install_clingo.py /home/spack/install_clingo.py | ||
|
||
RUN ${HOME}/bootstrap_clingo2014.sh 36 | ||
RUN ${HOME}/bootstrap_clingo2014.sh 37 | ||
RUN ${HOME}/bootstrap_clingo2014.sh 38 | ||
RUN ${HOME}/bootstrap_clingo2014.sh 39 | ||
RUN ${HOME}/bootstrap_clingo2014.sh 310 | ||
RUN ${HOME}/bootstrap_clingo2014.sh 311 | ||
RUN ${HOME}/bootstrap_clingo2014.sh 312 | ||
|
||
COPY --chown=spack:spack clingo/scripts/create_binary_mirror.sh /home/spack/create_binary_mirror.sh | ||
RUN ${HOME}/create_binary_mirror.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
import sys | ||
|
||
import archspec.cpu | ||
|
||
import spack.bootstrap | ||
import spack.bootstrap.config | ||
import spack.main | ||
|
||
|
||
if sys.platform == "linux": | ||
CLINGO_BASE_SPEC = "clingo-bootstrap@spack +static_libstdcpp +optimized +ipo ~docs" | ||
else: | ||
CLINGO_BASE_SPEC = "clingo-bootstrap@spack +optimized +ipo ~docs" | ||
|
||
install = spack.main.SpackCommand('install') | ||
|
||
with spack.bootstrap.spack_python_interpreter(): | ||
|
||
with spack.bootstrap.config.spack_python_interpreter(): | ||
msg = 'Installing clingo-bootstrap with Python: {0}' | ||
print(msg.format(spack.bootstrap.spec_for_current_python())) | ||
clingo_str = 'clingo-bootstrap@spack +static_libstdcpp target={0}'.format( | ||
str(archspec.cpu.host().family) | ||
) | ||
print(msg.format(spack.bootstrap.config.spec_for_current_python())) | ||
clingo_str = f'{CLINGO_BASE_SPEC} target={str(archspec.cpu.host().family)}' | ||
install(clingo_str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
FROM ghcr.io/spack/manylinux2014:v2022-10-25 | ||
FROM ghcr.io/spack/manylinux2014:v2023-10-03 | ||
|
||
RUN adduser -m spack | ||
|
||
# Switch to a non-root user | ||
USER spack | ||
ENV SPACK_CMD="/opt/python/cp39-cp39/bin/python /home/spack/spack/bin/spack" | ||
ENV SPACK_CMD="/opt/python/cp311-cp311/bin/python /home/spack/spack/bin/spack" | ||
WORKDIR /home/spack | ||
|
||
# Clone the repo and install Spack | ||
RUN git clone https://www.github.com/spack/spack.git | ||
RUN git clone https://www.github.com/spack/spack.git && \ | ||
cd spack && \ | ||
git checkout -b docker-reference 08da9a854a53542e1f71d30ed8d14d6b7d18119f && \ | ||
cd .. | ||
|
||
# Set externals, locate compilers | ||
RUN ${SPACK_CMD} external find --not-buildable gawk perl | ||
RUN ${SPACK_CMD} compiler find | ||
|
||
RUN ${SPACK_CMD} python -c "import archspec.cpu;print(archspec.cpu.host().family)" > target.txt | ||
RUN ${SPACK_CMD} -c "config:install_tree:padded_length:256" install gnupg target=$(cat target.txt) | ||
RUN ${SPACK_CMD} -c "config:install_tree:padded_length:256" install gnupg "target=$(cat target.txt)" | ||
|
||
RUN mkdir -p /home/spack/binary-mirror && \ | ||
${SPACK_CMD} -c "config:install_tree:padded_length:256" buildcache create -d /home/spack/binary-mirror -a -u -f gnupg target=$(cat target.txt) | ||
${SPACK_CMD} -c "config:install_tree:padded_length:256" buildcache push --unsigned --force /home/spack/binary-mirror gnupg "target=$(cat target.txt)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.