forked from uw-ssec/caustics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Ciela-Institute#194 from Ciela-Institute/dev
Dev
- Loading branch information
Showing
82 changed files
with
5,966 additions
and
851 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -57,7 +57,7 @@ jobs: | |
ls -ltrh | ||
ls -ltrh dist | ||
- name: Publish to Test PyPI | ||
uses: pypa/[email protected].11 | ||
uses: pypa/[email protected].14 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
verbose: true | ||
|
@@ -95,5 +95,5 @@ jobs: | |
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected].11 | ||
- uses: pypa/[email protected].14 | ||
if: startsWith(github.ref, 'refs/tags') |
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,122 @@ | ||
name: Docker Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
paths: | ||
- "src/**" | ||
- "tests/**" | ||
- "resources/docker/Dockerfile" | ||
- "resources/docker/*.lock" | ||
- "resources/docker/*.yaml" | ||
- "resources/docker/*.sh" | ||
- ".github/workflows/image_ci.yml" | ||
pull_request: | ||
branches: | ||
- "dev-**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
FORCE_COLOR: 3 | ||
DOCKER_REGISTRY: ghcr.io | ||
DOCKER_ORG: ${{ github.repository_owner }} | ||
GITHUB_SHA: ${{ github.sha }} | ||
GITHUB_REF: ${{ github.ref }} | ||
GITHUB_HEAD_REF: ${{ github.head_ref }} | ||
GITHUB_REF_NAME: ${{ github.ref_name }} | ||
PROJECT_NAME: caustics | ||
|
||
jobs: | ||
build-images: | ||
name: build-image | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Currently need to be hardcoded | ||
# for more version, will need to modify | ||
# the conda environment to be able | ||
# to install different versions of CUDA | ||
CUDA_VERSION: ["11.8.0"] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get registry and org | ||
id: registry_org | ||
run: | | ||
ORG=$(echo "${DOCKER_ORG}" | tr '[:upper:]' '[:lower:]') | ||
echo "image_base=${DOCKER_REGISTRY}/${ORG}" >> $GITHUB_OUTPUT | ||
- name: Get short github sha | ||
id: github_sha | ||
run: | | ||
SHA7="${GITHUB_SHA::7}" | ||
echo "short_sha=${SHA7}" >> $GITHUB_OUTPUT | ||
- name: Extract branch name | ||
id: extract_branch | ||
run: | ||
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> | ||
$GITHUB_OUTPUT | ||
|
||
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | ||
- name: Free up disk space | ||
run: | | ||
df -h | ||
docker image ls | ||
sudo apt clean | ||
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc | ||
df -h | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | ||
${{ steps.registry_org.outputs.image_base }}/${{ env.PROJECT_NAME }} | ||
tags: | | ||
type=raw,value=${{ steps.extract_branch.outputs.branch }}-cuda-${{ matrix.CUDA_VERSION }} | ||
type=raw,value=${{ steps.github_sha.outputs.short_sha }}-cuda-${{ matrix.CUDA_VERSION }} | ||
- name: Log in to registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.DOCKER_REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build and export to Docker | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./resources/docker/Dockerfile | ||
platforms: linux/amd64 | ||
load: | ||
${{ !contains(fromJSON('["refs/heads/main", "refs/heads/dev"]'), | ||
env.GITHUB_REF) }} | ||
push: | ||
${{ contains(fromJSON('["refs/heads/main", "refs/heads/dev"]'), | ||
env.GITHUB_REF) }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
CAUSTICS_VERSION=${{ steps.extract_branch.outputs.branch }} | ||
CUDA_VERSION=${{ matrix.CUDA_VERSION }} | ||
- name: Inspect Image | ||
if: ${{ env.GITHUB_REF != 'refs/heads/main' }} | ||
run: | | ||
docker run ${{ steps.registry_org.outputs.image_base }}/${{ env.PROJECT_NAME }}:${{ steps.github_sha.outputs.short_sha }}-cuda-${{ matrix.CUDA_VERSION }} micromamba list | ||
docker image ls |
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,35 @@ | ||
cff-version: 1.0.0 | ||
message: "If you use this software, please cite it as below." | ||
authors: | ||
- family-names: "Stone" | ||
given-names: "Connor" | ||
orcid: "https://orcid.org/0000-0002-9086-6398" | ||
- family-names: "Adam" | ||
given-names: "Alexandre" | ||
orcid: "https://orcid.org/0000-0001-8806-7936" | ||
- family-names: "Perreault-Levasseur" | ||
given-names: "Laurence" | ||
orcid: "https://orcid.org/0000-0003-3544-3939" | ||
- family-names: "Hezaveh" | ||
given-names: "Yashar" | ||
orcid: "https://orcid.org/0000-0002-8669-5733" | ||
- family-names: "Core" | ||
given-names: "Cordero" | ||
orcid: "https://orcid.org/0000-0002-3531-3221" | ||
- family-names: "Setiawan" | ||
given-names: "Landung" | ||
orcid: "https://orcid.org/0000-0002-1624-2667" | ||
- family-names: "Coogan" | ||
given-names: "Adam" | ||
- family-names: "Filipp" | ||
given-names: "Andreas" | ||
- family-names: "Wilson" | ||
given-names: "Charles" | ||
- family-names: "Yantovski-Barth" | ||
given-names: "Misha" | ||
- family-names: "Legin" | ||
given-names: "Ronan" | ||
title: "caustics" | ||
doi: 10.5281/zenodo.10806382 | ||
abstract: "The lensing pipeline of the future: GPU-accelerated, automatically-differentiable, highly modular. Currently under heavy development: expect interface changes and some imprecise/untested calculations." | ||
repository-code: "https://github.com/Ciela-Institute/caustics" |
Oops, something went wrong.