Skip to content

Commit

Permalink
Merge branch 'main' into feature/151-creating-task-in-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
axel7083 authored Jan 29, 2024
2 parents 50e87d0 + 6ba8fbd commit 6cab38c
Show file tree
Hide file tree
Showing 21 changed files with 965 additions and 117 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ jobs:
- name: Publish Image
id: publish-image
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/studio-extension
IMAGE_LATEST=${IMAGE_NAME}:latest
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/ai-studio
IMAGE_NIGHTLY=${IMAGE_NAME}:nightly
IMAGE_SHA=${IMAGE_NAME}:${GITHUB_SHA}
podman build -t $IMAGE_LATEST .
podman push $IMAGE_LATEST
podman tag $IMAGE_LATEST $IMAGE_SHA
podman build -t $IMAGE_NIGHTLY .
podman push $IMAGE_NIGHTLY
podman tag $IMAGE_NIGHTLY $IMAGE_SHA
podman push $IMAGE_SHA
136 changes: 136 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
#
# Copyright (C) 2024 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

name: release

on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
branch:
description: 'Branch to use for the release'
required: true
default: main
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

jobs:

tag:
name: Tagging
runs-on: ubuntu-20.04
outputs:
githubTag: ${{ steps.TAG_UTIL.outputs.githubTag}}
extVersion: ${{ steps.TAG_UTIL.outputs.extVersion}}
releaseId: ${{ steps.create_release.outputs.id}}

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
- name: Generate tag utilities
id: TAG_UTIL
run: |
TAG_PATTERN=${{ github.event.inputs.version }}
echo "githubTag=v$TAG_PATTERN" >> ${GITHUB_OUTPUT}
echo "extVersion=$TAG_PATTERN" >> ${GITHUB_OUTPUT}
- name: tag
run: |
git config --local user.name ${{ github.actor }}
# Add the new version in package.json file
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" packages/backend/package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" packages/frontend/package.json
git add package.json
git add packages/backend/package.json
git add packages/frontend/package.json
# commit the changes
git commit -m "chore: 🥁 tagging ${{ steps.TAG_UTIL.outputs.githubTag }} 🥳"
echo "Tagging with ${{ steps.TAG_UTIL.outputs.githubTag }}"
git tag ${{ steps.TAG_UTIL.outputs.githubTag }}
git push origin ${{ steps.TAG_UTIL.outputs.githubTag }}
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ steps.TAG_UTIL.outputs.githubTag }}
name: ${{ steps.TAG_UTIL.outputs.githubTag }}
draft: true
prerelease: false

build:
needs: [tag]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(npx yarn cache dir)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Execute yarn
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npx yarn --frozen-lockfile --network-timeout 180000

- name: Run Build
run: npx yarn build

- name: Login to ghcr.io
run: podman login --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io

- name: Build Image
id: build-image
run: |
podman build -t ghcr.io/${{ github.repository_owner }}/ai-studio:${{ needs.tag.outputs.extVersion }} .
podman push ghcr.io/${{ github.repository_owner }}/ai-studio:${{ needs.tag.outputs.extVersion }}
podman tag ghcr.io/${{ github.repository_owner }}/ai-studio:${{ needs.tag.outputs.extVersion }} ghcr.io/${{ github.repository_owner }}/ai-studio:latest
podman push ghcr.io/${{ github.repository_owner }}/ai-studio:latest
release:
needs: [tag, build]
name: Release
runs-on: ubuntu-20.04
steps:
- name: id
run: echo the release id is ${{ needs.tag.outputs.releaseId}}

- name: Publish release
uses: StuYarrow/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ needs.tag.outputs.releaseId}}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
dist
.eslintcache
**/coverage
.idea
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# studio extension
# AI studio

## Installing a development version

You can install this extension from Podman Desktop UI > ⚙ Settings > Extensions > Install a new extension from OCI Image.

The name of the image to use is `ghcr.io/projectatomic/studio-extension:latest`.
The name of the image to use is `ghcr.io/projectatomic/ai-studio:latest`.

You can get earlier tags for the image at https://github.com/projectatomic/studio-extension/pkgs/container/studio-extension.
You can get earlier tags for the image at https://github.com/projectatomic/studio-extension/pkgs/container/ai-studio.

These images contain development versions of the extension. There is no stable release yet.

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "studio-extension-monorepo",
"displayName": "studio-extension-monorepo",
"description": "studio-extension-monorepo",
"name": "ai-studio-monorepo",
"displayName": "ai-studio-monorepo",
"description": "ai-studio-monorepo",
"publisher": "redhat",
"version": "0.0.0",
"private": true,
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "studio-extension",
"displayName": "studio extension",
"description": "Podman Desktop Studio Extension",
"name": "ai-studio",
"displayName": "AI Studio",
"description": "Podman Desktop AI Studio",
"version": "0.1.0-next",
"icon": "icon.png",
"publisher": "redhat",
Expand Down
39 changes: 16 additions & 23 deletions packages/backend/src/ai.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,22 @@
"config": "chatbot/ai-studio.yaml",
"readme": "# Locallm\n\nThis repo contains artifacts that can be used to build and run LLM (Large Language Model) services locally on your Mac using podman. These containerized LLM services can be used to help developers quickly prototype new LLM based applications, without the need for relying on any other externally hosted services. Since they are already containerized, it also helps developers move from their prototype to production quicker. \n\n## Current Locallm Services: \n\n* [Chatbot](#chatbot)\n* [Text Summarization](#text-summarization)\n* [Fine-tuning](#fine-tuning)\n\n### Chatbot\n\nA simple chatbot using the gradio UI. Learn how to build and run this model service here: [Chatbot](/chatbot/).\n\n### Text Summarization\n\nAn LLM app that can summarize arbitrarily long text inputs. Learn how to build and run this model service here: [Text Summarization](/summarizer/).\n\n### Fine Tuning \n\nThis application allows a user to select a model and a data set they'd like to fine-tune that model on. Once the application finishes, it outputs a new fine-tuned model for the user to apply to other LLM services. Learn how to build and run this model training job here: [Fine-tuning](/finetune/).\n\n## Architecture\n![](https://raw.githubusercontent.com/MichaelClifford/locallm/main/assets/arch.jpg)\n\nThe diagram above indicates the general architecture for each of the individual model services contained in this repo. The core code available here is the \"LLM Task Service\" and the \"API Server\", bundled together under `model_services`. With an appropriately chosen model downloaded onto your host,`model_services/builds` contains the Containerfiles required to build an ARM or an x86 (with CUDA) image depending on your need. These model services are intended to be light-weight and run with smaller hardware footprints (given the Locallm name), but they can be run on any hardware that supports containers and scaled up if needed.\n\nWe also provide demo \"AI Applications\" under `ai_applications` for each model service to provide an example of how a developers could interact with the model service for their own needs. ",
"models": [
"llama-2-7b-chat.Q5_K_S",
"albedobase-xl-1.3",
"sdxl-turbo"
"llama-2-7b-chat.Q5_K_S"
]
},
{
"id": "summarizer",
"description" : "Summarizer application",
"name" : "Summarizer",
"repository": "https://github.com/redhat-et/locallm",
"icon": "natural-language-processing",
"categories": [
"natural-language-processing"
],
"config": "summarizer/ai-studio.yaml",
"readme": "# Summarizer\n\nThis model service is intended be be used for text summarization tasks. This service can ingest an arbitrarily long text input. If the input length is less than the models maximum context window it will summarize the input directly. If the input is longer than the maximum context window, the input will be divided into appropriately sized chunks. Each chunk will be summarized and a final \"summary of summaries\" will be the services final output. ",
"models": [
"llama-2-7b-chat.Q5_K_S"
]
}
],
Expand All @@ -28,26 +41,6 @@
"popularity": 3,
"license": "?",
"url": "https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_S.gguf"
},
{
"id": "albedobase-xl-1.3",
"name": "AlbedoBase XL 1.3",
"description": "Stable Diffusion XL has 6.6 billion parameters, which is about 6.6 times more than the SD v1.5 version. I believe that this is not just a number, but a number that can lead to a significant improvement in performance. It has been a while since we realized that the overall performance of SD v1.5 has improved beyond imagination thanks to the explosive contributions of our community. Therefore, I am working on completing this AlbedoBase XL model in order to optimally reproduce the performance improvement that occurred in v1.5 in this XL version as well. My goal is to directly test the performance of all Checkpoints and LoRAs that are publicly uploaded to Civitai, and merge only the resources that are judged to be optimal after passing through several filters. This will surpass the performance of image-generating AI of companies such as Midjourney. As of now, AlbedoBase XL v0.4 has merged exactly 55 selected checkpoints and 138 LoRAs.",
"hw": "CPU",
"registry": "Civital",
"popularity": 3,
"license": "openrail++",
"url": ""
},
{
"id": "sdxl-turbo",
"name": "SDXL Turbo",
"description": "SDXL Turbo achieves state-of-the-art performance with a new distillation technology, enabling single-step image generation with unprecedented quality, reducing the required step count from 50 to just one.",
"hw": "CPU",
"registry": "Hugging Face",
"popularity": 3,
"license": "sai-c-community",
"url": ""
}
],
"categories": [
Expand Down
Loading

0 comments on commit 6cab38c

Please sign in to comment.