-
Notifications
You must be signed in to change notification settings - Fork 13
Add amzn2023 #17
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
Open
haampie
wants to merge
14
commits into
spack:main
Choose a base branch
from
haampie:bump/amzn
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add amzn2023 #17
Changes from 6 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d97c7cb
Add amzn2023-x86_64_v2
haampie a27e99a
also set LC_ALL=en_US.UTF-8 uniformly
haampie 58766d8
add to ci
haampie 82c9749
use makefile
haampie d1bbc8b
fixes
haampie 48c10b0
locale
haampie b76a83e
env
haampie c52e922
also arm
haampie 7b4a73c
duplicate compilers because spack likes redundancy :(
haampie 14311c4
formatting
haampie d0d2362
looks like target is optional... lets see
haampie 444dd91
paths
haampie 2d5b19d
ci test
haampie 82aae0b
bring back all
haampie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| FROM amazonlinux:2023 as build | ||
|
|
||
| WORKDIR /root | ||
|
|
||
| ENV LC_ALL=C \ | ||
| PATH=/root/tools/bin:/root/spack/bin:/usr/bin:/bin | ||
|
|
||
| RUN yum install -y \ | ||
| bzip2 \ | ||
| clang \ | ||
| git \ | ||
| lld \ | ||
| make \ | ||
| patch \ | ||
| python \ | ||
| tar \ | ||
| unzip \ | ||
| xz | ||
|
|
||
| RUN mkdir spack && \ | ||
| cd spack && \ | ||
| curl -Lfs https://github.com/spack/spack/archive/refs/heads/develop.tar.gz | tar -xzf - --strip-components=1 -C . && \ | ||
| curl -Lfs https://github.com/spack/spack/pull/34926.patch | patch -p1 && \ | ||
| curl -Lfs https://github.com/spack/spack/pull/35020.patch | patch -p1 && \ | ||
| curl -Lfs https://github.com/spack/spack/pull/35078.patch | patch -p1 && \ | ||
| curl -Lfs https://github.com/spack/spack/pull/35174.patch | patch -p1 && \ | ||
| true | ||
|
|
||
| ADD spack.yaml build.mk /root/ | ||
|
|
||
| ADD Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml /root/spack/etc/spack | ||
|
|
||
| # Assume system make is too old | ||
| RUN spack env create --with-view /root/tools tools && \ | ||
| spack -e tools add [email protected] && \ | ||
| spack -e tools concretize && \ | ||
| spack -e tools install | ||
|
|
||
| RUN --mount=type=cache,target=/buildcache \ | ||
| --mount=type=cache,target=/root/.spack/cache \ | ||
| spack mirror add cache /buildcache && \ | ||
| make -f build.mk -j$(nproc) BUILDCACHE=/buildcache | ||
|
|
||
| # Remove Spack metadata / Python cache to save some bytes | ||
| RUN find -L /opt/spack -type d \( -name '__pycache__' -or -name '.spack' \) -exec rm -rf {} + && \ | ||
| find -L /opt/spack -type f -name '*.a' -exec rm -rf {} + | ||
|
|
||
| # Stage 2, create a small(er) docker image | ||
| FROM amazonlinux:2023 | ||
|
|
||
| ENV NVIDIA_VISIBLE_DEVICES=all \ | ||
| NVIDIA_DRIVER_CAPABILITIES=compute,utility \ | ||
| LANG=C.UTF-8 \ | ||
| LC_ALL=C.UTF-8 | ||
haampie marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| PATH=/opt/spack/view/bin:/root/spack/bin:$PATH | ||
|
|
||
| COPY --from=build /opt/spack /opt/spack | ||
|
|
||
| # We stick to system compilers & linkers | ||
| RUN yum install -y gcc g++ gfortran binutils && \ | ||
| yum clean all && \ | ||
| rm -rf /var/cache/yum/* | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| compilers: | ||
| - compiler: | ||
| spec: [email protected] | ||
| paths: | ||
| cc: /usr/bin/clang | ||
| cxx: /usr/bin/clang++ | ||
| f77: null | ||
| fc: null | ||
| flags: | ||
| cxxflags: '-O3 -g0' | ||
| cflags: '-O3 -g0' | ||
| ldflags: '-fuse-ld=lld -Wl,-O3' | ||
| operating_system: amzn2023 | ||
| target: x86_64 | ||
| modules: [] | ||
| environment: {} | ||
| extra_rpaths: [] | ||
| - compiler: | ||
| spec: [email protected] | ||
| paths: | ||
| cc: /usr/bin/gcc | ||
| cxx: /usr/bin/g++ | ||
| f77: null | ||
| fc: null | ||
| flags: | ||
| cxxflags: '-O3 -g0' | ||
| cflags: '-O3 -g0' | ||
| operating_system: amzn2023 | ||
| target: x86_64 | ||
| modules: [] | ||
| environment: {} | ||
| extra_rpaths: [] |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| packages: | ||
| all: | ||
| require: target=x86_64_v2 |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| SPACK ?= spack | ||
| SPACK_INSTALL_FLAGS += --no-check-signature | ||
| BUILDCACHE = $(CURDIR)/buildcache | ||
| MAKEFLAGS += -Orecurse | ||
|
|
||
| export SPACK_COLOR = always | ||
| export SPACK_BACKTRACE = yes | ||
|
|
||
| .PHONY: all | ||
|
|
||
| all: push | ||
| $(SPACK) -e . gc --yes-to-all | ||
| $(SPACK) -e . env view --link run enable /opt/spack/view | ||
|
|
||
| include env.mk | ||
|
|
||
| spack.lock: spack.yaml | ||
| $(SPACK) -e . concretize -f | ||
|
|
||
| env.mk: spack.lock | ||
| $(SPACK) -e . env depfile -o $@ --make-prefix spack | ||
|
|
||
| spack/push/%: spack/install/% | ||
| $(SPACK) -e . buildcache create --unsigned --allow-root --only=package $(BUILDCACHE) /$(HASH) # push $(SPEC) | ||
|
|
||
| push: $(addprefix spack/push/,$(spack/SPACK_PACKAGE_IDS)) | ||
| $(SPACK) -e . buildcache update-index $(BUILDCACHE) |
This file contains hidden or 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,6 +1,7 @@ | ||
| spack: | ||
| view: false | ||
| specs: | ||
| - 'awscli' | ||
| - 'clingo-bootstrap@spack +optimized' | ||
| - 'curl' | ||
| - 'file' | ||
|
|
@@ -13,7 +14,7 @@ spack: | |
| - 'patch' | ||
| - 'patchelf' | ||
| - 'py-boto3' | ||
| - '[email protected] %clang +optimizations' | ||
| - '[email protected] %clang +optimizations +zlib_ng' | ||
| - 'tar' | ||
| - 'unzip' | ||
| - 'vim' | ||
|
|
@@ -23,4 +24,9 @@ spack: | |
| install_tree: | ||
| root: /opt/spack/store | ||
| concretizer: | ||
| unify: true | ||
| unify: true | ||
| packages: | ||
| all: | ||
| variants: ~nls | ||
| zlib: | ||
| variants: ~shared | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.