Skip to content

Commit

Permalink
Add flow configuration, upstream sync workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
YevheniiSemendiak committed Mar 5, 2024
1 parent eb51ad1 commit 47acdbf
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/sync-fork.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: sync-fork
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch: {}
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- run: gh repo sync $REPOSITORY -b $BRANCH_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY: ${{ github.repository }}
BRANCH_NAME: ${{ github.ref_name }}
50 changes: 50 additions & 0 deletions .neuro/live.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
kind: live
title: My flow

defaults:
life_span: 1d

images:
ollama_public:
ref: ollama/ollama
open_webui:
ref: image:${{ project.project_name }}/$[[ flow.project_id ]]/openwebui
context: ${{ flow.workspace }}/
dockerfile: ${{ flow.workspace }}/Dockerfile

volumes:
data:
remote: storage:/$[[ project.project_name ]]/$[[ flow.project_id ]]/data
mount: /root/.ollama
local: data
webdata:
remote: storage:/$[[ project.project_name ]]/$[[ flow.project_id ]]/web
mount: /app/backend/data
local: webdata

jobs:
ollama_bash:
image: $[[ images.ollama_public.ref ]]
life_span: 1d
volumes:
- $[[ volumes.data.ref_ro ]]
entrypoint: bash

ollama_worker:
image: $[[ images.ollama_public.ref ]]
life_span: 10d
detach: true
preset: gpu-small
volumes:
- $[[ volumes.data.ref_rw ]]

web:
image: ${{ images.open_webui.ref }}
volumes:
- ${{ volumes.webdata.ref_rw }}
http_port: 8080
preset: cpu-small
detach: true
env:
OLLAMA_API_BASE_URL: http://${{ inspect_job('ollama_worker').internal_hostname_named }}:11434/api
WEBUI_SECRET_KEY: "neuro"
6 changes: 6 additions & 0 deletions .neuro/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Check our full reference documentation at https://neu-ro.gitbook.io/neuro-flow/reference/project-configuration-syntax
id: ollama_server
## Could be referenced as $[[ project.id ]] or $[[ flow.project_id ]] contexts.
## Default value: name of the folder containing `.neuro`
# project_name: ollama
## Optional platform project name that owns the flow, referenced via $[[ project.project_name ]]

0 comments on commit 47acdbf

Please sign in to comment.