mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
[improvement](config) add bat script for standalone start and llm start (#69)
This commit is contained in:
@@ -10,13 +10,12 @@ set "buildDir=%baseDir%\build"
|
||||
cd "%baseDir%"
|
||||
|
||||
rem 1. build semantic chat service
|
||||
del /q "%buildDir%\*.tar.gz"
|
||||
rd /s /q dist
|
||||
del /q "%buildDir%\*.tar.gz" 2>NUL
|
||||
|
||||
call mvn -f "%baseDir%\..\pom.xml" clean package -DskipTests
|
||||
|
||||
rem 2. move package to build
|
||||
copy "%baseDir%\..\launchers\standalone\target\*.tar.gz" "%buildDir%\supersonic.tar.gz"
|
||||
echo f|xcopy "%baseDir%\..\launchers\standalone\target\*.tar.gz" "%buildDir%\supersonic.tar.gz"
|
||||
|
||||
rem 3. build webapp
|
||||
cd "%baseDir%\..\webapp"
|
||||
|
||||
39
assembly/bin/start-standalone.bat
Normal file
39
assembly/bin/start-standalone.bat
Normal file
@@ -0,0 +1,39 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set "sbinDir=%~dp0"
|
||||
set "baseDir=%~dp0.."
|
||||
set "runtimeDir=%baseDir%\..\runtime"
|
||||
set "buildDir=%baseDir%\build"
|
||||
|
||||
cd /d %baseDir%
|
||||
|
||||
::1. clear file
|
||||
rd /s /q "%runtimeDir%"
|
||||
mkdir "%runtimeDir%"
|
||||
|
||||
|
||||
::2. package lib
|
||||
:: Assuming you have tar utility installed in Windows
|
||||
tar -zxvf "%buildDir%\supersonic.tar.gz" -C "%runtimeDir%"
|
||||
|
||||
for /d %%f in ("%runtimeDir%\launchers-standalone-*") do (
|
||||
move "%%f" "%runtimeDir%\supersonic-standalone"
|
||||
)
|
||||
|
||||
tar -zxvf "%buildDir%\supersonic-webapp.tar.gz" -C "%buildDir%"
|
||||
|
||||
if not exist "%runtimeDir%\supersonic-standalone\webapp" mkdir "%runtimeDir%\supersonic-standalone\webapp"
|
||||
|
||||
xcopy /s /e /h /y "%buildDir%\supersonic-webapp\*" "%runtimeDir%\supersonic-standalone\webapp"
|
||||
|
||||
if not exist "%runtimeDir%\supersonic-standalone\conf\webapp" mkdir "%runtimeDir%\supersonic-standalone\conf\webapp"
|
||||
xcopy /s /e /h /y "%runtimeDir%\supersonic-standalone\webapp\*" "%runtimeDir%\supersonic-standalone\conf\webapp"
|
||||
|
||||
rd /s /q "%buildDir%\supersonic-webapp"
|
||||
|
||||
|
||||
::3. start service
|
||||
::start standalone service
|
||||
call "%runtimeDir%\supersonic-standalone\bin\service.bat" restart
|
||||
call "%runtimeDir%\supersonic-standalone\llm\bin\service.bat" restart
|
||||
12
assembly/bin/stop-standalone.bat
Normal file
12
assembly/bin/stop-standalone.bat
Normal file
@@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set "sbinDir=%~dp0"
|
||||
set "baseDir=%~dp0.."
|
||||
set "runtimeDir=%baseDir%\..\runtime"
|
||||
set "buildDir=%baseDir%\build"
|
||||
|
||||
::3. start service
|
||||
::start standalone service
|
||||
call "%runtimeDir%\supersonic-standalone\bin\service.bat" stop
|
||||
call "%runtimeDir%\supersonic-standalone\llm\bin\service.bat" stop
|
||||
Reference in New Issue
Block a user