Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ MODELS_DIR=./models
#
# ACESTEP_API_URL=http://localhost:7860

# ── acestep-cpp source / custom fork ─────────────────────────────────────────
# Override the repository cloned by build.sh (useful for custom forks):
# ACESTEP_CPP_REPO=https://github.com/your-fork/acestep.cpp.git
#
# Checkout a specific branch or tag after cloning:
# ACESTEP_CPP_BRANCH=main

# ── Storage ───────────────────────────────────────────────────────────────────
AUDIO_DIR=./public/audio

Expand Down
14 changes: 11 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
# --rocm force ROCm/HIP build
# --vulkan force Vulkan build
# --cpu CPU-only build (disable GPU auto-detection)
# --repo URL override the git repository to clone
# --repo URL override the git repository to clone (env: ACESTEP_CPP_REPO)
# --branch NAME checkout a specific branch/tag after cloning (env: ACESTEP_CPP_BRANCH)

set -e

Expand All @@ -19,6 +20,7 @@ SRC_DIR="${ACESTEP_CPP_SRC:-$DIR/acestep.cpp}"
BIN_DIR="${ACESTEP_BIN_DIR:-$DIR/bin}"
BUILD_DIR="$SRC_DIR/build"
REPO="${ACESTEP_CPP_REPO:-https://github.com/audiohacking/acestep.cpp.git}"
BRANCH="${ACESTEP_CPP_BRANCH:-}"
FORCE_FLAGS=""
CPU_ONLY=0

Expand All @@ -28,6 +30,7 @@ while [ $# -gt 0 ]; do
--src) SRC_DIR="$2"; BUILD_DIR="$SRC_DIR/build"; shift ;;
--bin) BIN_DIR="$2"; shift ;;
--repo) REPO="$2"; shift ;;
--branch) BRANCH="$2"; shift ;;
--cuda) FORCE_FLAGS="-DGGML_CUDA=ON" ;;
--rocm) FORCE_FLAGS="-DGGML_HIP=ON" ;;
--vulkan) FORCE_FLAGS="-DGGML_VULKAN=ON" ;;
Expand Down Expand Up @@ -60,8 +63,13 @@ fi

# ── Clone or update acestep.cpp ───────────────────────────────────────────────
if [ ! -d "$SRC_DIR/.git" ]; then
echo "Cloning acestep.cpp from $REPO ..."
git clone --depth 1 "$REPO" "$SRC_DIR"
if [ -n "$BRANCH" ]; then
echo "Cloning acestep.cpp from $REPO (branch: $BRANCH) ..."
git clone --depth 1 --branch "$BRANCH" "$REPO" "$SRC_DIR"
else
echo "Cloning acestep.cpp from $REPO ..."
git clone --depth 1 "$REPO" "$SRC_DIR"
fi
echo ""
else
echo "acestep.cpp source found at $SRC_DIR"
Expand Down
6 changes: 6 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ elif [ -n "${ACESTEP_BIN:-}" ] && [ -x "$ACESTEP_BIN" ]; then
else
echo ""
echo "Building acestep.cpp for your hardware (detects GPU automatically)..."
echo " Repo: ${ACESTEP_CPP_REPO:-https://github.com/audiohacking/acestep.cpp.git}"
[ -n "${ACESTEP_CPP_BRANCH:-}" ] && echo " Branch: $ACESTEP_CPP_BRANCH"
echo ""
bash build.sh || {
echo ""
Expand All @@ -46,6 +48,10 @@ else
echo " cmake --build acestep.cpp/build --parallel"
echo " Then set ACESTEP_BIN_DIR=$(pwd)/bin in .env"
echo ""
echo " To use a custom fork or branch, set before running setup.sh:"
echo " ACESTEP_CPP_REPO=https://github.com/your-fork/acestep.cpp.git ./setup.sh"
echo " ACESTEP_CPP_BRANCH=my-branch ./setup.sh"
echo ""
}
fi

Expand Down
Loading