Skip to content

Commit

Permalink
Merge pull request #15 from tplr-ai/feat/regenesis
Browse files Browse the repository at this point in the history
feat demo + docker+ watchtower
  • Loading branch information
distributedstatemachine authored Dec 31, 2024
2 parents da899d8 + 5cf61ee commit 3d72a2c
Show file tree
Hide file tree
Showing 56 changed files with 6,406 additions and 7,446 deletions.
9 changes: 0 additions & 9 deletions .env-template.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WANDB_API_KEY=your_api_key_here
15 changes: 1 addition & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ jobs:
- name: Install dependencies
run: uv sync --extra all

- name: Create .env.yaml
run: |
echo "account_id: \"$ACCOUNT_ID\"" > .env.yaml
echo "read:" >> .env.yaml
echo " access_key_id: \"$READ_ACCESS_KEY_ID\"" >> .env.yaml
echo " secret_access_key: \"$READ_SECRET_ACCESS_KEY\"" >> .env.yaml
echo "write:" >> .env.yaml
echo " access_key_id: \"$WRITE_ACCESS_KEY_ID\"" >> .env.yaml
echo " secret_access_key: \"$WRITE_SECRET_ACCESS_KEY\"" >> .env.yaml
- name: Run Ruff Lint
uses: astral-sh/ruff-action@v1
with:
Expand All @@ -40,7 +30,4 @@ jobs:
- name: Run Ruff Format
uses: astral-sh/ruff-action@v1
with:
args: format --check

- name: Run Tests
run: uv run pytest
args: format --check
60 changes: 60 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Docker Build and Publish

on:
release:
types: [published]
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: tplr-ai/templar

jobs:
build-and-push:
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

- 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 }}
tags: |
# Release tags (v1.0.0, 1.0.0)
type=semver,pattern={{version}}
type=semver,pattern={{raw}}
# Latest tag on release or main branch
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
# SHA for every build
type=sha,prefix=sha-,format=short
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
15 changes: 4 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ venv/
.env/
uv.lock

# Ruff sepcific
.ruff*

# IDE
.idea/
.vscode/
Expand All @@ -40,14 +43,4 @@ uv.lock

# Project specific
wandb
checkpoint-*
checkpoints.ipynb
analysis.ipynb
scratch*
bad_slices/
good_slices
slices
foo*
# Evals
lm-evaluation-harness
models
*ipynb
Loading

0 comments on commit 3d72a2c

Please sign in to comment.