Skip to content

Commit a33977c

Browse files
committed
fixing build
1 parent c60fd66 commit a33977c

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 NornicDB Contributors
3+
Copyright (c) 2025 NornicDB Contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -41,5 +41,5 @@ the MIT License.
4141

4242
NornicDB was originally developed as part of the Mimir project
4343
(https://github.com/orneryd/Mimir) and was split into this standalone
44-
repository in December 2024. All commit history and attributions have
44+
repository in December 2025. All commit history and attributions have
4545
been preserved.

build.bat

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ REM cpu-localllm CPU with llama.cpp embeddings (BYOM)
88
REM cpu-bge CPU with llama.cpp + BGE model embedded
99
REM cuda CUDA with llama.cpp embeddings (BYOM)
1010
REM cuda-bge CUDA with llama.cpp + BGE model embedded
11+
REM vulkan Vulkan GPU acceleration (cross-platform)
1112
REM
1213
REM Usage:
1314
REM build.bat cpu Build CPU-only (no embeddings)
@@ -49,6 +50,7 @@ if "%VARIANT%"=="cpu-localllm" goto :build_cpu_localllm
4950
if "%VARIANT%"=="cpu-bge" goto :build_cpu_bge
5051
if "%VARIANT%"=="cuda" goto :build_cuda
5152
if "%VARIANT%"=="cuda-bge" goto :build_cuda_bge
53+
if "%VARIANT%"=="vulkan" goto :build_vulkan
5254

5355
echo ERROR: Unknown variant '%VARIANT%'
5456
echo Run 'build.bat help' for usage
@@ -199,6 +201,42 @@ if defined HEADLESS (
199201
)
200202
if errorlevel 1 goto :build_failed
201203

204+
REM Copy model alongside binary
205+
copy "%MODELS_DIR%\bge-m3.gguf" "%BIN_DIR%\" >nul 2>&1
206+
echo.
207+
echo ✓ Build successful!
208+
echo Model embedded: %BIN_DIR%\bge-m3.gguf
209+
echo Ready to run - GPU-accelerated embeddings!
210+
goto :eof
211+
212+
:build_vulkan
213+
echo ===============================================================
214+
echo Building: NornicDB Vulkan GPU (cross-platform)
215+
echo Output: %BIN_DIR%\nornicdb-vulkan.exe
216+
echo ===============================================================
217+
call :check_go
218+
if not exist "%BIN_DIR%" mkdir "%BIN_DIR%"
219+
220+
set "BUILD_TAGS=vulkan"
221+
if defined HEADLESS set "BUILD_TAGS=vulkan noui"
222+
223+
set CGO_ENABLED=1
224+
set GOOS=windows
225+
set GOARCH=amd64
226+
227+
if defined HEADLESS (
228+
go build -tags="%BUILD_TAGS%" -ldflags="-s -w" -o "%BIN_DIR%\nornicdb-vulkan-headless.exe" .\cmd\nornicdb
229+
) else (
230+
go build -tags="%BUILD_TAGS%" -ldflags="-s -w" -o "%BIN_DIR%\nornicdb-vulkan.exe" .\cmd\nornicdb
231+
)
232+
if errorlevel 1 goto :build_failed
233+
echo.
234+
echo ✓ Build successful!
235+
echo Vulkan GPU acceleration enabled
236+
echo Works with NVIDIA, AMD, Intel GPUs
237+
echo Requires Vulkan SDK: https://vulkan.lunarg.com/
238+
echo Set VULKAN_SDK environment variable if needed
239+
202240
REM Copy model alongside binary
203241
copy "%MODELS_DIR%\bge-m3.gguf" "%BIN_DIR%\" >nul 2>&1
204242
echo.
@@ -378,6 +416,10 @@ echo.
378416
echo cuda-bge CUDA + llama.cpp + BGE model (~430MB)
379417
echo GPU-accelerated with embedded model
380418
echo.
419+
echo vulkan Vulkan GPU acceleration (~20MB)
420+
echo Works with NVIDIA, AMD, Intel GPUs
421+
echo Requires Vulkan SDK from LunarG
422+
echo.
381423
echo OPTIONS:
382424
echo headless Build without web UI (add as second argument)
383425
echo.

0 commit comments

Comments
 (0)