Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model_servers workflow renamed #112

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/chatbot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- name: Install python dependencies
working-directory: ./recipes/natural_language_processing/chatbot
run: make install
run: make install

- name: Run tests
working-directory: ./recipes/natural_language_processing/chatbot
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/model_servers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: model_servers

on:
pull_request:
branches:
- main
push:
branches:
- main

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/model_servers

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
services:
registry:
image: registry:2.8.3
ports:
- 5000:5000
steps:
- uses: actions/[email protected]

- name: Login to ghcr
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Buildah Action
uses: redhat-actions/[email protected]
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: latest
containerfiles: ./model_servers/llamacpp_python/base/Containerfile
context: model_servers/llamacpp_python/

- name: Download model
working-directory: ./model_servers/llamacpp_python/
run: make models/llama-2-7b-chat.Q5_K_S.gguf

- name: Set up Python
uses: actions/[email protected]

- name: Install python dependencies
working-directory: ./model_servers/llamacpp_python/
run: make install

- name: Run tests
working-directory: ./model_servers/llamacpp_python/
run: make test
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ install:
pip install -r tests/requirements-test.txt

.PHONY: run
run: models/llama-2-7b-chat.Q5_K_S.gguf install
run:
podman run -it -d -p 8001:8001 -v ./models:/locallm/models:ro,Z -e MODEL_PATH=models/llama-2-7b-chat.Q5_K_S.gguf -e HOST=0.0.0.0 -e PORT=8001 --net=host ghcr.io/redhat-et/model_servers

.PHONY: test
test: models/llama-2-7b-chat.Q5_K_S.gguf install
pytest --log-cli-level NOTSET
test:
pytest --collect-only tests --log-cli-level NOTSET

This file was deleted.

Loading