-
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.
Add num functions Switch to building and storing image for tests Add nvidia jetson xavier agx and apple m2
- Loading branch information
1 parent
622583c
commit b87795a
Showing
13 changed files
with
633 additions
and
39 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,12 @@ | ||
{ | ||
"image": "ghcr.io/uliegecsm/hwloc-xml-parser", | ||
"extensions" : [ | ||
"eamodio.gitlens", | ||
"mhutchie.git-graph", | ||
"ms-azuretools.vscode-docker" | ||
], | ||
"runArgs": [ | ||
"--privileged", | ||
], | ||
"onCreateCommand": "git config --global --add safe.directory $PWD" | ||
} |
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,56 @@ | ||
name: Build image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'requirements/*' | ||
- 'docker/dockerfile' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'requirements/*' | ||
- 'docker/dockerfile' | ||
|
||
jobs: | ||
|
||
set-vars: | ||
uses: ./.github/workflows/set-vars.yml | ||
|
||
build-image: | ||
needs: [set-vars] | ||
runs-on: [ubuntu-latest] | ||
container: | ||
image: docker:latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: Checkout code. | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU. | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx. | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry. | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ needs.set-vars.outputs.CI_REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push. | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.ref == 'refs/heads/main' }} | ||
file: docker/dockerfile | ||
tags: ${{ needs.set-vars.outputs.CI_IMAGE }} | ||
cache-from: type=registry,ref=${{ needs.set-vars.outputs.CI_IMAGE }} | ||
cache-to: type=inline | ||
labels: "org.opencontainers.image.source=${{ github.repositoryUrl }}" |
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,24 @@ | ||
on: | ||
workflow_call: | ||
outputs: | ||
CI_IMAGE: | ||
value: ${{ jobs.set-vars.outputs.CI_IMAGE }} | ||
CI_REGISTRY: | ||
value: ${{ jobs.set-vars.outputs.CI_REGISTRY }} | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
|
||
set-vars: | ||
runs-on: [ubuntu-latest] | ||
outputs: | ||
CI_IMAGE : ${{ steps.common.outputs.CI_IMAGE }} | ||
CI_REGISTRY: ${{ steps.common.outputs.CI_REGISTRY }} | ||
steps: | ||
- name: Export common variables. | ||
id : common | ||
run : | | ||
echo "CI_IMAGE=${{ env.REGISTRY }}/${{ github.repository }}" >> $GITHUB_OUTPUT | ||
echo "CI_REGISTRY=${{ env.REGISTRY }}" >> $GITHUB_OUTPUT |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM python:3.9 | ||
|
||
RUN --mount=type=bind,target=/requirements,type=bind,source=requirements <<EOF | ||
|
||
set -ex | ||
|
||
# Install system dependencies | ||
apt update | ||
|
||
apt --yes --no-install-recommends install $(grep -vE "^\s*#" /requirements/requirements.system.txt | tr "\n" " ") | ||
|
||
apt clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Python dependencies | ||
pip install -r /requirements/requirements.python.txt | ||
pip install pytest | ||
|
||
EOF |
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
File renamed without changes.
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 @@ | ||
hwloc |
Oops, something went wrong.