mirror of
https://github.com/juspay/services-flake.git
synced 2024-08-16 07:40:43 +03:00
chore: add example/llm
; github workflow to update the example/llm/flake.lock
For context, see: https://github.com/juspay/services-flake/pull/218#issuecomment-2163874302
This commit is contained in:
parent
c9e553879a
commit
82ff0e9876
40
.github/workflows/update-flake-lock-ex-llm.yaml
vendored
Normal file
40
.github/workflows/update-flake-lock-ex-llm.yaml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: update-flake-lock-ex-llm
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # allows manual triggering
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-ex-llm-lock:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Generate Github App Token
|
||||||
|
uses: navikt/github-app-token-generator@v1
|
||||||
|
id: github-app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.NIXOS_ASIA_APP_ID }}
|
||||||
|
private-key: ${{ secrets.NIXOS_ASIA_PRIVATE_KEY }}
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
- name: Update flake.lock
|
||||||
|
uses: DeterminateSystems/update-flake-lock@main
|
||||||
|
id: update-flake-lock
|
||||||
|
with:
|
||||||
|
commit-msg: "chore(example): Update llm/flake.lock"
|
||||||
|
pr-title: "Update example/llm/flake.lock"
|
||||||
|
pr-body: |
|
||||||
|
Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action.
|
||||||
|
|
||||||
|
```
|
||||||
|
{{ env.GIT_COMMIT_MESSAGE }}
|
||||||
|
```
|
||||||
|
pr-labels: |
|
||||||
|
automated
|
||||||
|
path-to-flake-dir: 'example/llm'
|
||||||
|
branch: "update_flake_lock_ex_llm"
|
||||||
|
token: ${{ steps.github-app-token.outputs.token }}
|
||||||
|
- run: "gh pr merge --auto --rebase --delete-branch ${{ steps.update-flake-lock.outputs.pull-request-number }}"
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
27
example/llm/flake.nix
Normal file
27
example/llm/flake.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
description = "A collection of services enabling the users to perform inference on LLM models";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
|
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
|
||||||
|
services-flake.url = "github:juspay/services-flake";
|
||||||
|
};
|
||||||
|
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
systems = import inputs.systems;
|
||||||
|
imports = [
|
||||||
|
inputs.process-compose-flake.flakeModule
|
||||||
|
];
|
||||||
|
perSystem = { self', pkgs, lib, ... }: {
|
||||||
|
process-compose."default" = {
|
||||||
|
imports = [
|
||||||
|
inputs.services-flake.processComposeModules.default
|
||||||
|
];
|
||||||
|
services.ollama."ollama1" = {
|
||||||
|
enable = true;
|
||||||
|
models = [ "llama2-uncensored" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
4
justfile
4
justfile
@ -10,6 +10,10 @@ changelog:
|
|||||||
ex-simple:
|
ex-simple:
|
||||||
cd ./example/simple && nix run . --override-input services-flake ../..
|
cd ./example/simple && nix run . --override-input services-flake ../..
|
||||||
|
|
||||||
|
# Run example/llm
|
||||||
|
ex-llm:
|
||||||
|
cd ./example/llm && nix run . --override-input services-flake ../..
|
||||||
|
|
||||||
# Run example/share-services
|
# Run example/share-services
|
||||||
ex-share-services:
|
ex-share-services:
|
||||||
cd ./example/share-services/pgweb && \
|
cd ./example/share-services/pgweb && \
|
||||||
|
Loading…
Reference in New Issue
Block a user