Skip to content

Commit

Permalink
add olmo action
Browse files Browse the repository at this point in the history
  • Loading branch information
natolambert committed Jul 17, 2024
1 parent c9da3cc commit c14c32b
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
79 changes: 79 additions & 0 deletions .github/workflows/push-image-olmo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This is an example workflow file.
#
# When you add a new image, copy this file and then change all mentions of "hello-world" with
# the name of your new image.
#
# Read through the rest of the comments in this file to figure out how it works, and what else
# you need to change.
name: build_open_instruct_olmo

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
# Run this workflow anytime a push updates one of the files in the image's directory
# (other than the README), and anytime there's a new release tag for this image.
paths:
- 'open_instruct/**'
- '!open_instruct/README.md'
- 'requirements-olmo.txt'
- 'Dockerfile.olmo'
# Note, add .olmo dockerfile + requirements if adding auto build to those
branches: [main]
pull_request: # note, comment this out for running on every push
# Also run on PRs that update the files in the image's directory (other than README).
branches: [main]
paths:
- 'open_instruct/**'
- '!open_instruct/README.md'
- 'requirements-olmo.txt'
- 'Dockerfile.olmo'
workflow_dispatch: # This allows us to manually trigger a build through the GitHub UI.

env:
DOCKER_BUILDKIT: "1"

jobs:
build:
name: open_instruct
runs-on: ubuntu-latest
timeout-minutes: 60
if: (github.event_name != 'workflow_run') || (github.event.workflow_run.conclusion == 'success')
steps:
- uses: actions/checkout@v3

- name: Setup environment
uses: ./.github/actions/setup
with:
beaker_token: ${{ secrets.BEAKER_TOKEN }}
# ghcr_token: ${{ secrets.GHCR_TOKEN }}
# ghcr_user: ${{ secrets.GHCR_USER }}

# big images fail, trying this
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache

- name: Build image
run: |
docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg CUDA=12.1.0 --build-arg \
TARGET=cudnn8-devel --build-arg DIST=ubuntu20.04 \
--build-arg REQUIRE=requirements.txt \
-f Dockerfile.olmo . \
-t open_instruct_olmo
- name: Check image
run: |
docker run --rm open_instruct_olmo
- name: Push image
# if: github.event_name != 'pull_request'
uses: ./.github/actions/push
with:
image: open_instruct_olmo # this is the tag of the image we just built in the previous step
beaker: open_instruct_olmo_auto # this is the name of the image on Beaker
latest: true # this flag says we should also push this as the 'latest' version to GHCR
2 changes: 1 addition & 1 deletion .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Read through the rest of the comments in this file to figure out how it works, and what else
# you need to change.
name: open_instruct
name: build_open_instruct

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down

0 comments on commit c14c32b

Please sign in to comment.