fix(deploy): connect core to local Qwen
This commit is contained in:
@@ -36,6 +36,7 @@ services:
|
||||
networks:
|
||||
omics_portal_omics_network:
|
||||
aliases: ["thothii-core"]
|
||||
localllm_default: {}
|
||||
|
||||
frontend:
|
||||
build:
|
||||
@@ -53,3 +54,5 @@ services:
|
||||
networks:
|
||||
omics_portal_omics_network:
|
||||
external: true
|
||||
localllm_default:
|
||||
external: true
|
||||
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
tmp=$(mktemp -d)
|
||||
trap 'rm -rf "$tmp"' EXIT HUP INT TERM
|
||||
mkdir -p "$tmp/deploy"
|
||||
cp compose.yaml "$tmp/compose.yaml"
|
||||
: >"$tmp/deploy/thothii.env"
|
||||
|
||||
docker compose --project-directory "$tmp" config --format json >"$tmp/config.json"
|
||||
node - "$tmp/config.json" <<'NODE'
|
||||
const fs = require("fs");
|
||||
const config = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
||||
if (!config.networks?.localllm_default?.external) {
|
||||
throw new Error("localllm_default must be an external network");
|
||||
}
|
||||
if (!config.services?.core?.networks?.localllm_default) {
|
||||
throw new Error("core must join localllm_default");
|
||||
}
|
||||
if (config.services?.frontend?.networks?.localllm_default) {
|
||||
throw new Error("frontend must not join the model network");
|
||||
}
|
||||
NODE
|
||||
Reference in New Issue
Block a user