Skip to content

Commit

Permalink
Merge pull request #4 from hummerichsander/release/v0.1.0
Browse files Browse the repository at this point in the history
Release/v0.1.0
  • Loading branch information
hummerichsander authored Sep 25, 2024
2 parents 9010ee0 + 954ca92 commit dfea5ac
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/publish_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create and publish a Docker image

on:
push:
branches: ['release/*']
branches: ['release/*', 'main']

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -36,9 +36,8 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=branch,pattern=release/v(?<version>\d+\.\d+\.\d+),group=version
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
id: push
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ COPY ./pyproject.toml /app
RUN pip install poetry
RUN poetry install

COPY ./openai_api_server_mock /app/openai_api_server_mock
COPY ./llm_api_server_mock /app/llm_api_server_mock

LABEL org.opencontainers.image.source="https://github.com/hummerichsander/openai_api_server_mock"
LABEL org.opencontainers.image.source="https://github.com/hummerichsander/llm_api_server_mock"

CMD ["poetry", "run", "fastapi", "run", "openai_api_server_mock/main.py", "--port", "8000"]
CMD ["poetry", "run", "fastapi", "run", "llm_api_server_mock/main.py", "--port", "8000"]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Instead of running a LLM model to generate completions, it simply returns a resp
- "lorem_ipsum": returns random "lorem ipsum" text

## Run via docker:
```bash
docker pull ghcr.io/hummerichsander/openai_api_server_mock:v ... # replace ... with the latest version
```bash # replace ... with the latest version
```

Environment variables:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "openai-api-server-mock"
name = "llm-api-server-mock"
version = "0.1.0"
description = "A mock for a LLM hosting server exposing the OpenAI Api."
authors = ["Sander Niels Hummerich <[email protected]>"]
Expand Down
51 changes: 48 additions & 3 deletions sandbox.ipynb

Large diffs are not rendered by default.

0 comments on commit dfea5ac

Please sign in to comment.