-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into object-leading-dimension
- Loading branch information
Showing
12 changed files
with
476 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This workflow builds an apptainer with tike installed | ||
|
||
name: Publish Apptainer | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
push: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
|
||
publish-apptainer-to-ghcr: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
cuda-version: | ||
- "11.8" | ||
- "12.0" | ||
target-arch: | ||
- "x86_64" | ||
- "aarch64" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64 | ||
- uses: eWaterCycle/setup-apptainer@v2 | ||
with: | ||
apptainer-version: 1.3.0 | ||
- name: Build container from definition | ||
run: > | ||
apptainer build | ||
--build-arg cuda_version=${{ matrix.cuda-version }} | ||
--build-arg target_arch=${{ matrix.target-arch }} | ||
--build-arg pkg_version=${{ github.ref_name }} | ||
apptainer.sif | ||
apptainer/${{ github.event.repository.name }}.def | ||
- name: Upload to container registry | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | apptainer registry login -u ${{ github.actor }} --password-stdin oras://ghcr.io | ||
apptainer push apptainer.sif oras://ghcr.io/${GITHUB_REPOSITORY,,}:${{ github.ref_name }}-${{ matrix.target-arch }}-cuda${{ matrix.cuda-version }} |
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,6 +1,9 @@ | ||
/tests/result/ | ||
archive/ | ||
|
||
# apptainer images | ||
*.sif | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Bootstrap: docker | ||
From: registry.fedoraproject.org/fedora-minimal:40-{{ target_arch }} | ||
|
||
%arguments | ||
target_arch=x86_64 | ||
cuda_version=12.0 | ||
pkg_version=main | ||
|
||
%post | ||
curl -L -o conda-installer.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-{{ target_arch }}.sh | ||
bash conda-installer.sh -b -p "/opt/miniconda" | ||
rm conda-installer.sh | ||
/opt/miniconda/bin/conda install unzip --yes | ||
curl -L -o source.zip https://github.com/AdvancedPhotonSource/tike/archive/{{ pkg_version }}.zip | ||
/opt/miniconda/bin/unzip source.zip | ||
rm source.zip | ||
cd tike* | ||
CONDA_OVERRIDE_CUDA={{ cuda_version }} /opt/miniconda/bin/conda install cuda-version={{ cuda_version }} --file requirements.txt --file requirements-container.txt -c conda-forge --yes | ||
/opt/miniconda/bin/conda clean --all --yes | ||
/opt/miniconda/bin/pip install . --no-deps --no-build-isolation | ||
/opt/miniconda/bin/pip check | ||
cd .. | ||
rm tike* -rf | ||
cd /opt/miniconda | ||
rm -r man cmake lib/cmake lib/pkgconfig include share var | ||
|
||
%runscript | ||
/opt/miniconda/bin/python "$@" |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
h5py | ||
hdf5plugin | ||
scikit-image | ||
scipy | ||
toml |
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
Oops, something went wrong.