Skip to content

Update Dockerfile

Update Dockerfile #2

name: Build GPT2 train image
on:
push:
paths:
- 'examples/pre-train-gpt/**'
jobs:
docker-build-train-gpt-example:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login Github Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/BaizeAI/train-gpt2-example
tags: |
type=raw,value=latest
type=raw,value=${{ github.run_id }}
- name: Build
uses: docker/build-push-action@v4
with:
context: examples/pre-train-gpt
platforms: linux/amd64
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max