Publish docker
All checks were successful
Publish documentation to great-ai.schmelczer.dev / publish (push) Successful in 1m3s
Check / Lint, format & type checks (push) Successful in 1m35s
Check / Test on Python 3.12 (push) Successful in 2m0s
Check / Test on Python 3.13 (push) Successful in 1m58s
Check / Notebooks on Python 3.12 (push) Successful in 6m29s
Check / Notebooks on Python 3.13 (push) Successful in 6m6s

This commit is contained in:
Andras Schmelczer 2026-10-28 23:16:43 +00:00
commit b08bc3b8ae
8 changed files with 47 additions and 30 deletions

View file

@ -1,10 +1,13 @@
name: Publish on DockerHub name: Publish container image on Forgejo
on: on:
push: push:
tags: ['*'] tags: ["*"]
workflow_dispatch: workflow_dispatch:
env:
REGISTRY: git.schmelczer.dev
jobs: jobs:
publish: publish:
runs-on: docker runs-on: docker
@ -35,17 +38,25 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3 uses: https://github.com/docker/setup-buildx-action@v3
- name: Log in to Docker Hub - name: Log in to the Forgejo container registry
uses: https://github.com/docker/login-action@v3 uses: https://github.com/docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_USERNAME }} registry: ${{ env.REGISTRY }}
password: ${{ secrets.DOCKER_PASSWORD }} username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_PACKAGE_TOKEN }}
- name: Extract metadata for the Docker image - name: Extract metadata for the Docker image
id: meta id: meta
uses: https://github.com/docker/metadata-action@v5 uses: https://github.com/docker/metadata-action@v5
with: with:
images: schmelczera/great-ai images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
labels: |
org.opencontainers.image.source=https://git.schmelczer.dev/${{ github.repository }}
- name: Build and push - name: Build and push
uses: https://github.com/docker/build-push-action@v6 uses: https://github.com/docker/build-push-action@v6

View file

@ -6,7 +6,7 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
LABEL org.opencontainers.image.title="GreatAI package wrapper image" LABEL org.opencontainers.image.title="GreatAI package wrapper image"
LABEL org.opencontainers.image.vendor="ScoutinScience B.V." LABEL org.opencontainers.image.vendor="ScoutinScience B.V."
LABEL org.opencontainers.image.authors="andras@schmelczer.dev" LABEL org.opencontainers.image.authors="andras@schmelczer.dev"
LABEL org.opencontainers.image.source="https://github.com/schmelczer/great-ai" LABEL org.opencontainers.image.source="https://git.schmelczer.dev/andras/great-ai"
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]

View file

@ -2,12 +2,10 @@
> Prepare your prototype AI code for production deployment. > Prepare your prototype AI code for production deployment.
[![PyPI version](https://badge.fury.io/py/great-ai.svg)](https://badge.fury.io/py/great-ai) [![PyPI version](https://img.shields.io/pypi/v/great-ai)](https://pypi.org/project/great-ai/)
[![Downloads](https://pepy.tech/badge/great-ai/month)](https://pepy.tech/project/great-ai) [![Downloads](https://static.pepy.tech/badge/great-ai/month)](https://pepy.tech/projects/great-ai)
[![Docker Pulls](https://img.shields.io/docker/pulls/schmelczera/great-ai)](https://hub.docker.com/repository/docker/schmelczera/great-ai) [![Container image](https://img.shields.io/badge/container-Forgejo-orange)](https://git.schmelczer.dev/andras/great-ai/packages)
[![Check](https://git.schmelczer.dev/andras/great-ai/badges/workflows/test.yml/badge.svg?branch=main)](https://git.schmelczer.dev/andras/great-ai/actions?workflow=test.yml) [![Check](https://git.schmelczer.dev/andras/great-ai/badges/workflows/test.yml/badge.svg?branch=main&label=Check)](https://git.schmelczer.dev/andras/great-ai/actions?workflow=test.yml)
[![Sonar line coverage](https://sonar.scoutinscience.com/api/project_badges/measure?project=great-ai&metric=coverage)](https://sonar.scoutinscience.com/dashboard?id=great-ai)
[![Sonar LoC](https://sonar.scoutinscience.com/api/project_badges/measure?project=great-ai&metric=ncloc)](https://sonar.scoutinscience.com/dashboard?id=great-ai)
Applying AI is becoming increasingly more accessible, but many case studies have shown that these applications are often deployed poorly. This may lead to suboptimal performance and to introducing unintended biases. GreatAI helps prepare prototype AI code for deployment with tracing, model versioning, and API scaffolding. These engineering features support oversight; they do not establish a model's accuracy, fairness, or trustworthiness, which require evaluation for the intended use case. Applying AI is becoming increasingly more accessible, but many case studies have shown that these applications are often deployed poorly. This may lead to suboptimal performance and to introducing unintended biases. GreatAI helps prepare prototype AI code for deployment with tracing, model versioning, and API scaffolding. These engineering features support oversight; they do not establish a model's accuracy, fairness, or trustworthiness, which require evaluation for the intended use case.
@ -72,10 +70,10 @@ With uv installed and your virtual environment active:
uv pip install great-ai uv pip install great-ai
``` ```
## Find `great-ai` on [DockerHub](https://hub.docker.com/repository/docker/schmelczera/great-ai) ## Find `great-ai` on [Forgejo](https://git.schmelczer.dev/andras/great-ai/packages)
```sh ```sh
docker run -p6060:6060 schmelczera/great-ai docker run -p6060:6060 git.schmelczer.dev/andras/great-ai:latest
``` ```
## Contribute ## Contribute
@ -119,5 +117,12 @@ scripts/release.sh 0.2.0
``` ```
This bumps the version, builds, commits, tags, and pushes `main` and the tag This bumps the version, builds, commits, tags, and pushes `main` and the tag
atomically. The tag triggers the PyPI and DockerHub workflows, which require atomically. The tag triggers the PyPI and Forgejo container publishing workflows,
`PYPI_TOKEN`, `DOCKER_USERNAME`, and `DOCKER_PASSWORD` in Forgejo repository secrets. which require `PYPI_TOKEN` and `DOCKER_PACKAGE_TOKEN` in Forgejo Actions secrets.
`DOCKER_PACKAGE_TOKEN` must belong to the repository owner and have
`write:package` permission.
Container images are published only to `git.schmelczer.dev/andras/great-ai` for
Linux AMD64 and ARM64. Stable release tags publish both `vX.Y.Z` and `X.Y.Z`,
and update `latest`. Running the container workflow manually on `main` also
updates `latest`.

View file

@ -38,7 +38,7 @@ numpy==1.23.0
```Dockerfile title="Dockerfile" ```Dockerfile title="Dockerfile"
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM schmelczera/great-ai:v0.1.6 FROM git.schmelczer.dev/andras/great-ai:latest
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
@ -55,6 +55,9 @@ CMD ["deploy.ipynb"]
> This is used by the CD pipeline to create the production deployment of the service. > This is used by the CD pipeline to create the production deployment of the service.
For reproducible deployments, replace `latest` with a release tag from the
[Forgejo container registry](https://git.schmelczer.dev/andras/great-ai/packages).
## .dockerignore ## .dockerignore
```dockerignore title=".dockerignore" ```dockerignore title=".dockerignore"

View file

@ -107,7 +107,7 @@ Run the notebook directly in a container or create a service for it using your f
```sh ```sh
docker run -p 6060:6060 --volume `pwd`:/app --rm \ docker run -p 6060:6060 --volume `pwd`:/app --rm \
schmelczera/great-ai deploy.ipynb git.schmelczer.dev/andras/great-ai:latest deploy.ipynb
``` ```
> You can replace ``pwd`` with the path to your code's folder. > You can replace ``pwd`` with the path to your code's folder.
@ -119,7 +119,7 @@ To this end, you can also create a custom Docker image. It is especially useful
```Dockerfile ```Dockerfile
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM schmelczera/great-ai:latest FROM git.schmelczer.dev/andras/great-ai:latest
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv

View file

@ -3,12 +3,10 @@
<img src="media/logo.png" width=80> <img src="media/logo.png" width=80>
</div> </div>
[![PyPI version](https://badge.fury.io/py/great-ai.svg)](https://badge.fury.io/py/great-ai) [![PyPI version](https://img.shields.io/pypi/v/great-ai)](https://pypi.org/project/great-ai/)
[![Downloads](https://pepy.tech/badge/great-ai/month)](https://pepy.tech/project/great-ai) [![Downloads](https://static.pepy.tech/badge/great-ai/month)](https://pepy.tech/projects/great-ai)
[![Docker Pulls](https://img.shields.io/docker/pulls/schmelczera/great-ai)](https://hub.docker.com/repository/docker/schmelczera/great-ai) [![Container image](https://img.shields.io/badge/container-Forgejo-orange)](https://git.schmelczer.dev/andras/great-ai/packages)
[![Check](https://git.schmelczer.dev/andras/great-ai/badges/workflows/test.yml/badge.svg?branch=main)](https://git.schmelczer.dev/andras/great-ai/actions?workflow=test.yml) [![Check](https://git.schmelczer.dev/andras/great-ai/badges/workflows/test.yml/badge.svg?branch=main&label=Check)](https://git.schmelczer.dev/andras/great-ai/actions?workflow=test.yml)
[![Sonar line coverage](https://sonar.scoutinscience.com/api/project_badges/measure?project=great-ai&metric=coverage)](https://sonar.scoutinscience.com/dashboard?id=great-ai)
[![Sonar LoC](https://sonar.scoutinscience.com/api/project_badges/measure?project=great-ai&metric=ncloc)](https://sonar.scoutinscience.com/dashboard?id=great-ai)
Applying AI is becoming increasingly easier, but many case studies have shown that these applications are often deployed poorly. This may lead to suboptimal performance and to introducing [unintended biases](https://en.wikipedia.org/wiki/Weapons_of_Math_Destruction){ target=_blank }. GreatAI helps ==prepare prototype AI code for deployment with tracing, model versioning, and API scaffolding==. These engineering features support oversight; they do not establish a model's accuracy, fairness, or trustworthiness, which require evaluation for the intended use case. Applying AI is becoming increasingly easier, but many case studies have shown that these applications are often deployed poorly. This may lead to suboptimal performance and to introducing [unintended biases](https://en.wikipedia.org/wiki/Weapons_of_Math_Destruction){ target=_blank }. GreatAI helps ==prepare prototype AI code for deployment with tracing, model versioning, and API scaffolding==. These engineering features support oversight; they do not establish a model's accuracy, fairness, or trustworthiness, which require evaluation for the intended use case.
@ -112,7 +110,7 @@ However, research indicates that professionals rarely use them. This may be due
<div style="display: flex; justify-content: space-evenly; flex-wrap: wrap;" markdown> <div style="display: flex; justify-content: space-evenly; flex-wrap: wrap;" markdown>
[:fontawesome-brands-python: Find it on PyPI](https://pypi.org/project/great-ai){ .md-button .md-button--primary } [:fontawesome-brands-python: Find it on PyPI](https://pypi.org/project/great-ai){ .md-button .md-button--primary }
[:fontawesome-brands-docker: Find it on DockerHub](https://hub.docker.com/repository/docker/schmelczera/great-ai){ .md-button .md-button--primary } [:fontawesome-brands-docker: Find the container image on Forgejo](https://git.schmelczer.dev/andras/great-ai/packages){ .md-button .md-button--primary }
[:fontawesome-solid-laptop-code: Check out the tutorial](https://great-ai.schmelczer.dev/tutorial){ .md-button .md-button--primary } [:fontawesome-solid-laptop-code: Check out the tutorial](https://great-ai.schmelczer.dev/tutorial){ .md-button .md-button--primary }
</div> </div>

View file

@ -19,8 +19,8 @@ extra:
link: https://github.com/schmelczer/great-ai link: https://github.com/schmelczer/great-ai
name: great-ai on Github name: great-ai on Github
- icon: fontawesome/brands/docker - icon: fontawesome/brands/docker
link: https://hub.docker.com/repository/docker/schmelczera/great-ai link: https://git.schmelczer.dev/andras/great-ai/packages
name: great-ai on DockerHub name: great-ai container image on Forgejo
- icon: fontawesome/brands/python - icon: fontawesome/brands/python
link: https://pypi.org/project/great-ai link: https://pypi.org/project/great-ai
name: great-ai on PyPI name: great-ai on PyPI

View file

@ -93,7 +93,7 @@ doctest_optionflags = ["ELLIPSIS"]
[project.urls] [project.urls]
Documentation = "https://great-ai.schmelczer.dev" Documentation = "https://great-ai.schmelczer.dev"
GitHub = "https://github.com/schmelczer/great-ai" GitHub = "https://github.com/schmelczer/great-ai"
DockerHub = "https://hub.docker.com/repository/docker/schmelczera/great-ai" "Container image" = "https://git.schmelczer.dev/andras/great-ai/packages"
[project.scripts] [project.scripts]
great_ai = "great_ai.__main__:main" great_ai = "great_ai.__main__:main"