mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
(improvement)(chat) It supports successful startup using Docker, local, and other methods. If the Chroma store creation fails, it will be replaced with in-memory (#1301)
This commit is contained in:
@@ -1,4 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
# Please execute the "supersonic-build.sh" command first
|
||||
# to generate the corresponding zip package in the "assembly/build/" directory.
|
||||
docker build --no-cache --build-arg SUPERSONIC_VERSION=$1 -t supersonic:$1 -f docker/Dockerfile .
|
||||
|
||||
# Function to execute the build script
|
||||
execute_build_script() {
|
||||
echo "Executing build script: assembly/bin/supersonic-build.sh"
|
||||
assembly/bin/supersonic-build.sh
|
||||
}
|
||||
|
||||
# Function to build the Docker image
|
||||
build_docker_image() {
|
||||
local version=$1
|
||||
echo "Building Docker image: supersonic:$version"
|
||||
docker build --no-cache --build-arg SUPERSONIC_VERSION=$version -t supersonic:$version -f docker/Dockerfile .
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Docker build failed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
echo "Docker image supersonic:$version built successfully."
|
||||
}
|
||||
|
||||
# Main script execution
|
||||
VERSION=$1
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "Usage: $0 <version>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
execute_build_script
|
||||
build_docker_image $VERSION
|
||||
Reference in New Issue
Block a user