返回 JoyAI-Echo
setup_local.sh
根目录 / echo_longvideo / Director_Agent / setup_local.sh
1 #!/usr/bin/env bash
2 set -euo pipefail
3
4 ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
6 if ! command -v uv >/dev/null 2>&1; then
7 echo "uv is required: https://docs.astral.sh/uv/" >&2
8 exit 1
9 fi
10 if ! command -v npm >/dev/null 2>&1; then
11 echo "Node.js and npm are required." >&2
12 exit 1
13 fi
14
15 cd "${ROOT}"
16 uv sync --extra api
17 npm --prefix webui ci
18
19 if [[ ! -f "${ROOT}/.config.local.json" ]]; then
20 cp "${ROOT}/.config.local.example.json" "${ROOT}/.config.local.json"
21 echo "Created .config.local.json."
22 fi
23 if [[ ! -f "${ROOT}/.env" ]]; then
24 cp "${ROOT}/.env.example" "${ROOT}/.env"
25 echo "Created .env. Add your model API key before starting."
26 fi
27
28 echo "Local dependencies are ready. Edit .env, then run bash start_local.sh."
29
29 lines BASH