Skip to content

Commit

Permalink
Merge pull request #17 from numerai/pschork/dockerize_releases
Browse files Browse the repository at this point in the history
Dockerize releases
  • Loading branch information
pschork authored Jun 6, 2023
2 parents da9881e + a4d5267 commit ccc8b4e
Show file tree
Hide file tree
Showing 6 changed files with 306 additions and 29 deletions.
43 changes: 37 additions & 6 deletions .github/workflows/deploy-3-10.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
name: Deploy Python 3.10 Image
name: Deploy Python 3.10 Latest

env:
REGISTRY: ghcr.io
IMAGE_NAME: numerai_predict

on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'predict.py'
- 'py3.10/**'

jobs:
deploy-py310-image:
public-py310-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2

- name: Log in to Github Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_10

- name: Push Docker image to Github Container registry
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./py3.10/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_10:latest
labels: ${{ steps.meta.outputs.labels }}

internal-py310-image:
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -27,4 +58,4 @@ jobs:
- name: Build and Push Docker Image
id: build-push-docker-image
run: |
make release_3_10
make push_latest_3_10
42 changes: 37 additions & 5 deletions .github/workflows/deploy-3-11.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
name: Deploy Python 3.11 Image

env:
REGISTRY: ghcr.io
IMAGE_NAME: numerai_predict

on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'predict.py'
- 'py3.11/**'

jobs:
deploy-py311-image:
public-py311-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2

- name: Log in to Github Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_11

- name: Push Docker image to Github Container registry
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./py3.11/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_11:latest
labels: ${{ steps.meta.outputs.labels }}

internal-py311-image:
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -27,4 +58,5 @@ jobs:
- name: Build and Push Docker Image
id: build-push-docker-image
run: |
make release_3_11
make push_latest_3_11
43 changes: 37 additions & 6 deletions .github/workflows/deploy-3-9.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
name: Deploy Python 3.9 Image
name: Deploy Python 3.9 Latest

env:
REGISTRY: ghcr.io
IMAGE_NAME: numerai_predict

on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'predict.py'
- 'py3.9/**'

jobs:
deploy-py39-image:
public-py39-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2

- name: Log in to Github Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_9

- name: Push Docker image to Github Container registry
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./py3.9/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_9:latest
labels: ${{ steps.meta.outputs.labels }}

internal-py39-image:
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -27,4 +58,4 @@ jobs:
- name: Build and Push Docker Image
id: build-push-docker-image
run: |
make release_3_9
make push_latest_3_9
159 changes: 159 additions & 0 deletions .github/workflows/push-docker-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: Push Docker Stable Release

env:
REGISTRY: ghcr.io
IMAGE_NAME: numerai_predict

on:
workflow_dispatch:
push:
branches:
- 'stable'

jobs:
public-py39-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2

- name: Log in to Github Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_9

- name: Push Docker image to Github Container registry
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./py3.9/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_9:stable
labels: ${{ steps.meta.outputs.labels }}

internal-py39-image:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.NUMERAI_CLOUD_ACCOUNT_ID }}:role/github-actions
aws-region: us-west-2

- name: Build and Push Docker Image
id: build-push-docker-image
run: |
make push_stable_3_9
public-py310-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2

- name: Log in to Github Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_10

- name: Push Docker image to Github Container registry
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./py3.10/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_10:stable
labels: ${{ steps.meta.outputs.labels }}

internal-py310-image:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.NUMERAI_CLOUD_ACCOUNT_ID }}:role/github-actions
aws-region: us-west-2

- name: Build and Push Docker Image
id: build-push-docker-image
run: |
make push_stable_3_10
public-py311-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2

- name: Log in to Github Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_11

- name: Push Docker image to Github Container registry
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./py3.11/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_py_3_11:stable
labels: ${{ steps.meta.outputs.labels }}

internal-py311-image:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.NUMERAI_CLOUD_ACCOUNT_ID }}:role/github-actions
aws-region: us-west-2

- name: Build and Push Docker Image
id: build-push-docker-image
run: |
make push_stable_3_11
Loading

0 comments on commit ccc8b4e

Please sign in to comment.