-
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.
- Loading branch information
Showing
5 changed files
with
44 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
FROM ghcr.io/spack/manylinux2014:v2023-10-03 | ||
|
||
RUN cd /opt/_internal && tar xvf static-libs-for-embedding-only.tar.xz && cd - | ||
RUN tar -C /opt/_internal -xvf static-libs-for-embedding-only.tar.xz | ||
|
||
RUN adduser -m spack | ||
|
||
# Switch to a non-root user | ||
USER spack | ||
ENV SPACK_CMD="/opt/python/cp311-cp311/bin/python /home/spack/spack/bin/spack" | ||
WORKDIR /home/spack | ||
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://www.github.com/spack/spack.git && \ | ||
RUN git clone https://github.com/spack/spack.git && \ | ||
git -C spack checkout -b docker-reference 9b4ca0be40edb02115be94bbc428ac546d63030e | ||
|
||
# Set externals, locate compilers | ||
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 spack external find -j 1 --not-buildable bison cmake | ||
RUN spack compiler find | ||
RUN spack config add config:concretizer:original | ||
RUN spack 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 | ||
COPY clingo/scripts/bootstrap_clingo_manylinux2014.sh /root/bootstrap_clingo2014.sh | ||
COPY clingo/scripts/install_clingo.py /root/install_clingo.py | ||
|
||
RUN ./bootstrap_clingo2014.sh 36 | ||
RUN ./bootstrap_clingo2014.sh 37 | ||
RUN ./bootstrap_clingo2014.sh 38 | ||
RUN ./bootstrap_clingo2014.sh 39 | ||
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 |
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,22 +1,19 @@ | ||
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/cp311-cp311/bin/python /home/spack/spack/bin/spack" | ||
WORKDIR /home/spack | ||
ENV SPACK_PYTHON="/opt/python/cp311-cp311/bin/python" | ||
ENV PATH="/root/spack/bin/spack:$PATH" | ||
WORKDIR /root | ||
|
||
# Clone the repo and install Spack | ||
RUN git clone https://www.github.com/spack/spack.git && \ | ||
RUN git clone https://github.com/spack/spack.git && \ | ||
git -C spack checkout -b docker-reference 9b4ca0be40edb02115be94bbc428ac546d63030e | ||
|
||
# Set externals, locate compilers | ||
RUN ${SPACK_CMD} external find --not-buildable gawk perl | ||
RUN ${SPACK_CMD} compiler find | ||
RUN spack external find --not-buildable gawk perl | ||
RUN spack 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 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 mkdir -p /home/spack/binary-mirror && \ | ||
${SPACK_CMD} -c "config:install_tree:padded_length:256" buildcache push --unsigned --force /home/spack/binary-mirror gnupg "target=$(cat target.txt)" | ||
spack -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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
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/cp311-cp311/bin/python /home/spack/spack/bin/spack" | ||
WORKDIR /home/spack | ||
ENV SPACK_PYTHON=/opt/python/cp311-cp311/bin/python | ||
ENV PATH="/root/spack/bin/spack:$PATH" | ||
WORKDIR /root | ||
|
||
# Clone the repo and install Spack | ||
RUN git clone https://www.github.com/spack/spack.git && \ | ||
RUN git clone https://github.com/spack/spack.git && \ | ||
git -C spack checkout -b docker-reference 9b4ca0be40edb02115be94bbc428ac546d63030e | ||
|
||
# Set externals, locate compilers | ||
RUN ${SPACK_CMD} external find --not-buildable cmake | ||
RUN ${SPACK_CMD} compiler find | ||
RUN spack external find --not-buildable cmake | ||
RUN spack 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 patchelf 'ldflags="-static-libstdc++ -static-libgcc"' "target=$(cat target.txt)" | ||
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 /home/spack/binary-mirror && \ | ||
${SPACK_CMD} -c "config:install_tree:padded_length:256" buildcache push --unsigned --force /home/spack/binary-mirror patchelf | ||
RUN mkdir -p /root/binary-mirror && \ | ||
spack -c config:install_tree:padded_length:256 buildcache push --unsigned --force /root/binary-mirror patchelf |