-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* testing workflow * testing workflow * testing workflow * testing workflow * testing workflow * testing workflow * testing workflow * testing workflow * testing workflow * testing workflow * testing workflow * this should be it, thank goodness * use new modelgauge without extras; bump version; fix tests * update lock file * add .dockerignore * add .dockerignore
- Loading branch information
1 parent
bed7ee4
commit 59110d4
Showing
7 changed files
with
567 additions
and
1,007 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dist | ||
run | ||
embed | ||
web | ||
tests | ||
docs | ||
.github | ||
.venv | ||
config |
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,33 @@ | ||
name: Build and Publish Docker Image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
tags: | | ||
ghcr.io/${{ github.repository }}:latest | ||
ghcr.io/${{ github.repository }}:${{ github.ref }} | ||
platforms: | | ||
linux/arm64/v8 | ||
linux/amd64 |
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,36 @@ | ||
# Base Stage | ||
FROM python:3.10-slim AS base | ||
|
||
ENV PYTHONFAULTHANDLER=1 \ | ||
PYTHONHASHSEED=random \ | ||
PYTHONUNBUFFERED=1 | ||
|
||
WORKDIR /app | ||
|
||
# Build Stage | ||
FROM base AS builder | ||
|
||
ENV PIP_DEFAULT_TIMEOUT=100 \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=1 \ | ||
PIP_NO_CACHE_DIR=1 \ | ||
POETRY_VERSION=1.8.3 | ||
|
||
RUN pip install "poetry==$POETRY_VERSION" | ||
RUN python -m venv /venv | ||
|
||
COPY pyproject.toml poetry.lock ./ | ||
RUN . /venv/bin/activate && poetry install --without=dev --no-root --no-interaction --no-ansi | ||
|
||
COPY . . | ||
RUN . /venv/bin/activate && poetry build | ||
|
||
# Final Stage | ||
FROM base AS final | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /venv /venv | ||
COPY --from=builder /app/dist . | ||
|
||
RUN . /venv/bin/activate && pip install *.whl | ||
ENTRYPOINT ["/venv/bin/modelbench", "--help"] |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ requires-python = ">=3.10, <3.13" | |
|
||
[tool.poetry] | ||
name = "modelbench" | ||
version = "0.5.1" | ||
version = "0.6.0" | ||
description = "Run benchmarks and generate reports measuring the behavior of many AI Systems." | ||
license = "Apache-2.0" | ||
authors = ["MLCommons AI Safety <[email protected]>"] | ||
|
@@ -47,7 +47,7 @@ packages = [ | |
|
||
[tool.poetry.dependencies] | ||
python = ">=3.10,<3.13" | ||
modelgauge = { version = ">=0.6.0", extras = ["perspective_api", "standard_tests"] } | ||
modelgauge = ">=0.6.0" | ||
jq = "^1.6.0" | ||
click = "^8.1.7" | ||
casefy = "^0.1.7" | ||
|
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