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

Fix/build args #38

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
1cf7c16
docs: set prompt example in swagger
alex-sandrk Nov 20, 2024
c8af450
fix: apply retry logic for both api calls of polling cycle
shev-titan Nov 20, 2024
396b44e
update documentation for new ui name and added testnet/mainnet .env e…
Nov 20, 2024
230d4e2
extend LocalModel response
alex-sandrk Nov 20, 2024
a8b69f3
updated desktop ui defaults
Nov 20, 2024
688b5e6
Merge pull request #283 from Lumerin-protocol/fix/swagger-prompt-example
alex-sandrk Nov 20, 2024
1ecc9d7
started proxy-router troubleshooting
Nov 20, 2024
cc4d6f0
Merge pull request #285 from Lumerin-protocol/fix-envexamples
abs2023 Nov 20, 2024
7a0d317
Merge pull request #284 from Lumerin-protocol/fix/polling-retry-disco…
abs2023 Nov 20, 2024
44d76d5
expose API URL
alex-sandrk Nov 21, 2024
e8795f9
add gitlab trigger for build and doc cleanup
Nov 21, 2024
4d7b6d9
Merge pull request #287 from Lumerin-protocol/fix/swagger-prompt-example
abs2023 Nov 21, 2024
24c565a
ensure all builds and triggers only run in Lumerin-protocol fork
Nov 21, 2024
7826f77
Merge pull request #288 from Lumerin-protocol/fix-envexamples
abs2023 Nov 21, 2024
aff3575
consolidated workflow back to single file and trigger deploy after bu…
Nov 21, 2024
53e6afb
Merge pull request #290 from Lumerin-protocol/fix-envexamples
abs2023 Nov 21, 2024
f60783c
fix: invalid headers parsing
shev-titan Nov 22, 2024
4353d0e
jethro recommended changes ! origin and test on feature branch
Nov 22, 2024
d47af2b
with proper feature branch naming
Nov 22, 2024
8e6c5fe
changed stg branch actions to test and removed featurbranch triggers
Nov 22, 2024
577c88e
Merge pull request #292 from Lumerin-protocol/fix-envexamples
abs2023 Nov 22, 2024
ca74813
fixed ci actions for new branch name and updated docs
Nov 22, 2024
3a2c274
Merge pull request #293 from Lumerin-protocol/fix-envexamples
abs2023 Nov 22, 2024
8af03a8
Merge pull request #291 from Lumerin-protocol/proxy/dev-289-invalid-h…
abs2023 Nov 22, 2024
6c9bfb4
update ci-cd conditions for gitlab trigger
Nov 22, 2024
a081951
Merge pull request #294 from Lumerin-protocol/fix-envexamples
abs2023 Nov 22, 2024
5462899
updated error handling for gitlab trigger
Nov 22, 2024
6fd7b8c
Merge pull request #295 from Lumerin-protocol/fix-envexamples
LumerinIO Nov 22, 2024
d8f5603
fine tuned gitlab-trigger
Nov 22, 2024
b449407
Merge pull request #296 from Lumerin-protocol/fix-envexamples
abs2023 Nov 22, 2024
5c5b63f
add clone to enable actions
Nov 22, 2024
60e9f26
Merge pull request #297 from Lumerin-protocol/fix-envexamples
abs2023 Nov 22, 2024
81e1480
fixed json response in gitlab pipeline api
Nov 22, 2024
1a431cd
Merge pull request #298 from Lumerin-protocol/fix-envexamples
abs2023 Nov 22, 2024
4f2dfb9
final test trigger
Nov 22, 2024
0968bf9
Merge pull request #299 from Lumerin-protocol/fix-envexamples
abs2023 Nov 22, 2024
ee66afe
reset gitlab ref branch based on lookup
Nov 22, 2024
3a66308
update readme
Nov 22, 2024
fb98d68
Merge pull request #301 from Lumerin-protocol/fix-envexamples
abs2023 Nov 22, 2024
6725e1b
feat: introduce json schema for models-config.json
shev-titan Nov 25, 2024
79f7314
feat: configurable rating config
shev-titan Nov 25, 2024
e42356a
fix: update schemas with titles and basic validations
shev-titan Nov 26, 2024
9dc1bce
chore: renaming
shev-titan Nov 26, 2024
c043877
feat: stricter validation
shev-titan Nov 26, 2024
a719073
chore: logging
shev-titan Nov 26, 2024
6a58502
ci: update build
shev-titan Nov 26, 2024
2a9f8c2
docs: update docs
shev-titan Nov 26, 2024
d7ded44
docs: update schema and example
shev-titan Nov 26, 2024
39cb286
Added UI tag for chain
bohdan-titan Nov 27, 2024
c8aeaa1
Merge pull request #307 from Lumerin-protocol/feature/chain-id
bohdan-titan Nov 27, 2024
70615cf
fix: incorrect pagination when overflow
shev-titan Nov 27, 2024
f51efd4
fix: validation to paging
shev-titan Nov 27, 2024
49bcb0d
Merge pull request #308 from Lumerin-protocol/proxy/fix-pagination
bohdan-titan Nov 27, 2024
eaa30c2
added paging to some request
bohdan-titan Dec 2, 2024
862f2ae
feat: prodia video generation
alex-sandrk Dec 2, 2024
a5b0c13
Merge pull request #310 from Lumerin-protocol/feature/paging-optimiza…
bohdan-titan Dec 2, 2024
38a0d17
cicd: versioning
loonerin Nov 26, 2024
89013f7
Merge pull request #306 from Lumerin-protocol/vertag
loonerin Dec 2, 2024
60279fb
cicd: versioning patch change
loonerin Dec 2, 2024
7af14da
Merge pull request #305 from Lumerin-protocol/proxy/DEV-115-rating
shev-titan Dec 2, 2024
f470309
Merge pull request #312 from Lumerin-protocol/vertagpat
loonerin Dec 2, 2024
ffc1cd2
update docs
alex-sandrk Dec 2, 2024
2f67891
Merge branch 'dev' of github.com:Lumerin-protocol/Morpheus-Lumerin-No…
alex-sandrk Dec 2, 2024
63dce8d
Merge pull request #311 from Lumerin-protocol/feat/prodia-video
alex-sandrk Dec 2, 2024
3531a56
fix: build args, version
shev-titan Dec 2, 2024
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
4 changes: 3 additions & 1 deletion .github/actions/copy_env_files/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ runs:
run: |
cp ./.github/workflows/models-config.json ./proxy-router/models-config.json
cp ./.github/workflows/models-config.json models-config.json
cp ./.github/workflows/rating-config.json ./proxy-router/rating-config.json
cp ./.github/workflows/rating-config.json rating-config.json
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
cp ./.github/workflows/proxy-router.main.env ./proxy-router/.env
cp ./.github/workflows/proxy-router.main.env .env
cp ./.github/workflows/ui-desktop.main.env ./ui-desktop/.env
elif [[ "${GITHUB_REF}" == "refs/heads/stg" ]]; then
elif [[ "${GITHUB_REF}" == "refs/heads/test" ]]; then
cp ./.github/workflows/proxy-router.test.env ./proxy-router/.env
cp ./.github/workflows/proxy-router.test.env .env
cp ./.github/workflows/ui-desktop.test.env ./ui-desktop/.env
Expand Down
32 changes: 22 additions & 10 deletions .github/actions/gen_tag_name/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,27 @@ runs:
id: tag
shell: bash
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
echo $SHORT_HASH
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
PREFIX="main-"
elif [[ "${GITHUB_REF}" == "refs/heads/stg" ]]; then
PREFIX="test-"
VMAJ=1
VMIN=0
VPAT=0
set +o pipefail
VLAST=$(git describe --tags --abbrev=0 --match='v[1-9]*' 2>/dev/null | cut -c2-)
[ $VLAST ] && IFS=. read -r VMAJ VMIN VPAT <<< $VLAST
if [ "$GITHUB_REF_NAME" = "main" ]
then
VPAT=0
VMIN=$((VMIN+1))
VFULL=${VMAJ}.${VMIN}
VTAG=v$VFULL
else
PREFIX="dev-"
MB=$(git merge-base refs/remotes/origin/main HEAD)
VPAT=$(git rev-list --count --no-merges ${MB}..HEAD)
VFULL=${VMAJ}.${VMIN}.${VPAT}
RNAME=${GITHUB_REF_NAME##*/}
[ "$GITHUB_EVENT_NAME" = "pull_request" ] && RNAME=pr${GITHUB_REF_NAME%/merge}
VTAG=v${VFULL}-${RNAME}
fi
TAG_NAME="${PREFIX}${SHORT_HASH}"
echo $TAG_NAME
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
echo "VLAST=$VLAST VMAJ=$VMAJ VMIN=$VMIN VPAT=$VPAT VFULL=$VFULL VTAG=$VTAG"
echo "TAG_NAME=${VTAG}" >> $GITHUB_ENV
echo "VTAG=${VTAG}" >> $GITHUB_ENV
echo "VFULL=${VFULL}" >> $GITHUB_ENV
99 changes: 92 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI-CD

on:
workflow_dispatch:
Expand All @@ -7,11 +7,14 @@ on:
description: 'Create new release'
required: true
type: boolean

push:
branches:
- main
- stg
- test
- dev
paths: ['.github/workflows/**', '**/Makefile', '**/*.go', '**/*.json', '**/*.yml', '**/*.ts', '**/*.js']

pull_request:
types: [opened, reopened, synchronize]
paths: ['.github/workflows/**', '**/Makefile', '**/*.go', '**/*.json', '**/*.yml', '**/*.ts', '**/*.js']
Expand All @@ -25,12 +28,79 @@ defaults:
shell: bash

jobs:
GitLab-Deploy:
if: ${{ github.repository != 'MorpheusAIs/Morpheus-Lumerin-Node' && (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test' || github.ref == 'refs/heads/dev')) }}
runs-on: ubuntu-latest
steps:
- name: Clone
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y jq

- name: Generate Tag Name
uses: ./.github/actions/gen_tag_name

- name: Determine GitLab Target Branch
id: set_target_branch
run: |
if [ "${{ github.ref_name }}" == "dev" ]; then
echo "gitlab_branch=dev" >> $GITHUB_ENV
elif [ "${{ github.ref_name }}" == "test" ]; then
echo "gitlab_branch=stg" >> $GITHUB_ENV
elif [ "${{ github.ref_name }}" == "main" ]; then
echo "gitlab_branch=main" >> $GITHUB_ENV
else
echo "This branch is not configured to trigger GitLab pipelines."
exit 1
fi

- name: Trigger GitLab Pipeline
run: |
echo "Triggering GitLab Build and Deploy for branch ${{ github.ref_name }} with tag ${{ env.TAG_NAME }}"

# Send request to GitLab
response=$(curl --silent \
--request POST \
--url "${{ secrets.GITLAB_TRIGGER_URL }}" \
--form "token=${{ secrets.GITLAB_TRIGGER_TOKEN }}" \
--form "ref=${{ env.gitlab_branch }}" \
--form "variables[SOURCE_REPO]=${{ github.repository }}" \
--form "variables[SOURCE_BRANCH]=${{ github.ref_name }}" \
--form "variables[GITHUB_TAG]=${{ env.TAG_NAME }}")

# Parse JSON response using jq
gitlab_status=$(echo "$response" | jq -r '.status // "unknown"')
gitlab_web_url=$(echo "$response" | jq -r '.web_url // "N/A"')

# Log the response
echo "GitLab Response: $response"

# Validate the status field
if [[ "$gitlab_status" =~ ^(created|preparing|success|running|scheduled)$ ]]; then
echo "GitLab pipeline triggered successfully! Status: $gitlab_status"
echo "Pipeline details: $gitlab_web_url"
else
echo "GitLab pipeline FAILED. Invalid status: $gitlab_status"
echo "Pipeline details: $gitlab_web_url"
exit 1
fi

Ubuntu-22-x64:
if: ${{ github.repository != 'MorpheusAIs/Morpheus-Lumerin-Node' }}
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Setup Go
uses: actions/setup-go@v5
Expand Down Expand Up @@ -94,11 +164,15 @@ jobs:
name: mor-launch-ubuntu-x64.zip

macOS-13-x64:
if: ${{ github.repository != 'MorpheusAIs/Morpheus-Lumerin-Node' }}
runs-on: macos-13
steps:
- name: Clone
uses: actions/checkout@v4
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Setup Go
uses: actions/setup-go@v5
Expand Down Expand Up @@ -165,11 +239,15 @@ jobs:
name: mor-launch-macos-x64.zip

macOS-14-arm64:
if: ${{ github.repository != 'MorpheusAIs/Morpheus-Lumerin-Node' }}
runs-on: macos-14
steps:
- name: Clone
uses: actions/checkout@v4
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Setup Go
uses: actions/setup-go@v5
Expand Down Expand Up @@ -236,11 +314,15 @@ jobs:
name: mor-launch-macos-arm64.zip

Windows-avx2-x64:
if: ${{ github.repository != 'MorpheusAIs/Morpheus-Lumerin-Node' }}
runs-on: windows-latest
steps:
- name: Clone
uses: actions/checkout@v4
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Setup Go
uses: actions/setup-go@v5
Expand Down Expand Up @@ -314,7 +396,7 @@ jobs:
name: mor-launch-win-x64.zip

release:
if: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/stg')) || github.event.inputs.create_release == 'true' }}
if: ${{ github.repository != 'MorpheusAIs/Morpheus-Lumerin-Node' && (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test' )) || github.event.inputs.create_release == 'true' }}
runs-on: ubuntu-latest
needs:
- Ubuntu-22-x64
Expand All @@ -325,6 +407,9 @@ jobs:
- name: Clone
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Generate Tag Name
uses: ./.github/actions/gen_tag_name
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/models-config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"0x0000000000000000000000000000000000000000000000000000000000000000": {
"$schema": "https://raw.githubusercontent.com/Lumerin-protocol/Morpheus-Lumerin-Node/a719073670adb17de6282b12d1852d39d629cb6e/proxy-router/internal/config/models-config-schema.json",
"models": [
{
"modelId": "0x0000000000000000000000000000000000000000000000000000000000000000",
"modelName": "llama2",
"apiType": "openai",
"apiUrl": "http://localhost:8080/v1"
}
}
]
}
31 changes: 27 additions & 4 deletions .github/workflows/proxy-router.main.env
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
# This file is used to set the environment variables for the cicd workflow
# To Generate the STG or TestNet release
# Contract and Token current as of 11/15/2024 (and are using the same values as the testnet)
# ...when mainnet release is imminent, update the values
# Contract and Token current as of 11/15/2024
# Full ENV details can be found in /docs/proxy-router.full.env
# Includes both TestNet and MainNet values, uncomment sections as desired

# Wallet_Private_Key is not needed if you will be running the MorpheusUI in conjunction with proxy-router
WALLET_PRIVATE_KEY=

# MAINNET VALUES (only MAINNET or TESTNET section should be uncommented)
DIAMOND_CONTRACT_ADDRESS=0xDE819AaEE474626E3f34Ef0263373357e5a6C71b
MOR_TOKEN_ADDRESS=0x092bAaDB7DEf4C3981454dD9c0A0D7FF07bCFc86
EXPLORER_API_URL="https://api.arbiscan.io/api"
ETH_NODE_CHAIN_ID=42161

# TESTNET VALUES
# DIAMOND_CONTRACT_ADDRESS=0xb8C55cD613af947E73E262F0d3C54b7211Af16CF
# MOR_TOKEN_ADDRESS=0x34a285a1b1c166420df5b6630132542923b5b27e
# EXPLORER_API_URL="https://api-sepolia.arbiscan.io/api"
# ETH_NODE_CHAIN_ID=421614

# COMMON
PROXY_ADDRESS=0.0.0.0:3333
WEB_ADDRESS=0.0.0.0:8082
WEB_PUBLIC_URL=http://localhost:8082
MODELS_CONFIG_PATH=
PROVIDER_ALLOW_LIST=
ETH_NODE_USE_SUBSCRIPTIONS=false
ETH_NODE_ADDRESS=
ETH_NODE_LEGACY_TX=false
PROXY_STORE_CHAT_CONTEXT=true
# PROXY_STORAGE_PATH=.\data\ (for windows)
PROXY_STORAGE_PATH=./data/
LOG_COLOR=true
LOG_COLOR=true

# Set to true to reset mac keychain on start (MorpheusUI only on Mac)
APP_RESET_KEYCHAIN=false
28 changes: 26 additions & 2 deletions .github/workflows/proxy-router.test.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
# This file is used to set the environment variables for the cicd workflow
# To Generate the STG or TestNet release
# Contract and Token current as of 11/15/2024
# Full ENV details can be found in /docs/proxy-router.full.env
# Includes both TestNet and MainNet values, uncomment sections as desired

# Wallet_Private_Key is not needed if you will be running the MorpheusUI in conjunction with proxy-router
WALLET_PRIVATE_KEY=

# MAINNET VALUES (only MAINNET or TESTNET section should be uncommented)
# DIAMOND_CONTRACT_ADDRESS=0xDE819AaEE474626E3f34Ef0263373357e5a6C71b
# MOR_TOKEN_ADDRESS=0x092bAaDB7DEf4C3981454dD9c0A0D7FF07bCFc86
# EXPLORER_API_URL="https://api.arbiscan.io/api"
# ETH_NODE_CHAIN_ID=42161

# TESTNET VALUES
DIAMOND_CONTRACT_ADDRESS=0xb8C55cD613af947E73E262F0d3C54b7211Af16CF
MOR_TOKEN_ADDRESS=0x34a285a1b1c166420df5b6630132542923b5b27e
EXPLORER_API_URL="https://api-sepolia.arbiscan.io/api"
ETH_NODE_CHAIN_ID=421614

# COMMON
PROXY_ADDRESS=0.0.0.0:3333
WEB_ADDRESS=0.0.0.0:8082
WEB_PUBLIC_URL=http://localhost:8082
MODELS_CONFIG_PATH=
PROVIDER_ALLOW_LIST=
ETH_NODE_USE_SUBSCRIPTIONS=false
ETH_NODE_ADDRESS=
ETH_NODE_LEGACY_TX=false
PROXY_STORE_CHAT_CONTEXT=true
# PROXY_STORAGE_PATH=.\data\ (for windows)
PROXY_STORAGE_PATH=./data/
LOG_COLOR=true
LOG_COLOR=true

# Set to true to reset mac keychain on start (MorpheusUI only on Mac)
APP_RESET_KEYCHAIN=false
14 changes: 14 additions & 0 deletions .github/workflows/rating-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/Lumerin-protocol/Morpheus-Lumerin-Node/a719073670adb17de6282b12d1852d39d629cb6e/proxy-router/internal/rating/rating-config-schema.json",
"algorithm": "default",
"providerAllowlist": ["0x0000000000000000000000000000000000000000"],
"params": {
"weights": {
"tps": 0.24,
"ttft": 0.08,
"duration": 0.24,
"success": 0.32,
"stake": 0.12
}
}
}
32 changes: 22 additions & 10 deletions .github/workflows/ui-desktop.main.env
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# This file is used to set the environment variables for the cicd workflow
# To Generate the MAIN or MAINNET release
# Contract and Token current as of 11/5/2024 (and are using the same values as the testnet)
# ...when mainnet release is imminent, update the values
BYPASS_AUTH=false
# Contract and Token current as of 11/5/2024

# MAINNET VALUES
CHAIN_ID=42161
DEBUG=false
DEFAULT_SELLER_CURRENCY=BTC
DEV_TOOLS=false
DIAMOND_ADDRESS=0xDE819AaEE474626E3f34Ef0263373357e5a6C71b
DISPLAY_NAME=Arbitrum
EXPLORER_URL=https://arbiscan.io/tx/{{hash}}
TOKEN_ADDRESS=0x092bAaDB7DEf4C3981454dD9c0A0D7FF07bCFc86
DEV_TOOLS=false
SYMBOL_ETH=ETH
SYMBOL_COIN=MOR

# TESTNET VALUES
# CHAIN_ID=421614
# DIAMOND_ADDRESS=0xb8C55cD613af947E73E262F0d3C54b7211Af16CF
# DISPLAY_NAME=Sepolia Arbitrum
# EXPLORER_URL=https://sepolia.arbiscan.io/tx/{{hash}}
# TOKEN_ADDRESS=0x34a285a1b1c166420df5b6630132542923b5b27e
# DEV_TOOLS=true
# SYMBOL_ETH=saETH
# SYMBOL_COIN=saMOR

# COMMON
BYPASS_AUTH=false
DEBUG=false
DEFAULT_SELLER_CURRENCY=BTC
IGNORE_DEBUG_LOGS=false
PROXY_WEB_DEFAULT_PORT=8082
SENTRY_DSN=
SYMBOL_ETH=ETH
SYMBOL_COIN=MOR
TOKEN_ADDRESS=0x092bAaDB7DEf4C3981454dD9c0A0D7FF07bCFc86
TRACKING_ID=
FAILOVER_ENABLED=
Loading