-
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.
Adds build for Keras2 / Tensorflow 2.15
Also fixes tf-probability req.
- Loading branch information
Showing
4 changed files
with
141 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: Create and publish a Docker image | ||
|
||
on: | ||
push: | ||
branches: main | ||
paths-ignore: | ||
- 'LICENSE' | ||
- 'README.md' | ||
- '.github/workflows/build-deploy-cuda.yml' | ||
- '.github/workflows/build-deploy.yml' | ||
- 'requirements.tf-2.17.0.txt' | ||
release: | ||
types: [published] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
TF_VERSION: 2.15.0 | ||
|
||
jobs: | ||
build-and-push-pyimage: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
flavor: | | ||
suffix=-py-tf${{ env.TF_VERSION }},onlatest=true | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=raw,value={{date 'YYYY'}},enable={{is_default_branch}} | ||
type=semver,pattern={{major}}.{{minor}}.{{patch}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
labels: | | ||
org.opencontainers.image.description=Combines the Docker Stacks tensorflow-notebook and pytorch-notebook containers plus jupytext and custom package additions. | ||
annotations: | | ||
org.opencontainers.image.description=Combines the Docker Stacks tensorflow-notebook and pytorch-notebook containers plus jupytext and custom package additions. | ||
- name: Build and push Python-only Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: Dockerfile-pyonly | ||
build-args: | | ||
TENSORFLOW_VERSION=${{ env.TF_VERSION }} | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
annotations: ${{ steps.meta.outputs.annotations }} | ||
cache-to: type=gha,mode=max | ||
cache-from: type=gha | ||
|
||
build-and-push-image-withR: | ||
runs-on: ubuntu-latest | ||
needs: build-and-push-pyimage | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
flavor: | | ||
suffix=-tf${{ env.TF_VERSION }},onlatest=true | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=raw,value={{date 'YYYY'}},enable={{is_default_branch}} | ||
type=semver,pattern={{major}}.{{minor}}.{{patch}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
labels: | | ||
org.opencontainers.image.description=Combines the Docker Stacks tensorflow-notebook, pytorch-notebook, and r-notebook containers plus jupytext and custom package additions. | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
build-args: | | ||
BASE_TAG=latest-py-tf${{ env.TF_VERSION }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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