faiss-node
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -103,2 +103,49 @@ cmake_minimum_required(VERSION 3.17 FATAL_ERROR) | ||
endif() | ||
if(EXISTS "/etc/debian_version") | ||
file(READ "/etc/issue" ETC_ISSUE) | ||
string(REGEX MATCH "Debian|Ubuntu" DIST ${ETC_ISSUE}) | ||
if(DIST STREQUAL "Debian") | ||
# Debian | ||
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE ) | ||
message("Debian:" ${ARCHITECTURE}) | ||
if( ${ARCHITECTURE} STREQUAL "x86_64" ) | ||
# Copy libgomp.so.1, libopenblas.so.0, libgfortran.so.5, libquadmath.so.0 | ||
set(DEPENDANCES | ||
libgomp.so.1 | ||
libopenblas.so.0 | ||
libgfortran.so.5 | ||
libquadmath.so.0) | ||
foreach(dep ${DEPENDANCES}) | ||
file(TO_CMAKE_PATH "/usr/lib/x86_64-linux-gnu/${dep}" MUSL_dep) | ||
message("Copy DEPENDANCES: " ${MUSL_dep}) | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
${MUSL_dep} | ||
$<TARGET_FILE_DIR:${PROJECT_NAME}>) | ||
endforeach() | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND patchelf --set-rpath "\\$$ORIGIN/" $<TARGET_FILE_DIR:${PROJECT_NAME}>/libopenblas.so.0 | ||
COMMAND patchelf --set-rpath "\\$$ORIGIN/" $<TARGET_FILE_DIR:${PROJECT_NAME}>/libgfortran.so.5 | ||
) | ||
else() | ||
# Copy libgomp.so.1, libopenblas.so.0, libgfortran.so.5 | ||
set(DEPENDANCES | ||
libgomp.so.1 | ||
libopenblas.so.0 | ||
libgfortran.so.5) | ||
foreach(dep ${DEPENDANCES}) | ||
file(TO_CMAKE_PATH "/lib/aarch64-linux-gnu/${dep}" MUSL_dep) | ||
message("Copy DEPENDANCES: " ${MUSL_dep}) | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
${MUSL_dep} | ||
$<TARGET_FILE_DIR:${PROJECT_NAME}>) | ||
endforeach() | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND patchelf --set-rpath "\\$$ORIGIN/" $<TARGET_FILE_DIR:${PROJECT_NAME}>/libopenblas.so.0 | ||
COMMAND patchelf --set-rpath "\\$$ORIGIN/" $<TARGET_FILE_DIR:${PROJECT_NAME}>/libgfortran.so.5 | ||
) | ||
endif() | ||
endif() | ||
endif() | ||
if(EXISTS "/etc/alpine-release") | ||
@@ -130,3 +177,3 @@ # Alpine | ||
endforeach() | ||
ENDIF() | ||
endif() | ||
endif() | ||
@@ -133,0 +180,0 @@ |
@@ -1,2 +0,2 @@ | ||
const { IndexFlatL2 } = require('../lib/index'); | ||
const { IndexFlatL2 } = require('faiss-node'); | ||
@@ -3,0 +3,0 @@ const dimension = 2; |
{ | ||
"name": "faiss-node", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Node.js bindings for faiss", | ||
@@ -23,3 +23,3 @@ "main": "lib/index.js", | ||
"build:test": "npm run build && npm run test", | ||
"prebuild-package": "prebuild --verbose --runtime napi --include-regex \"^(faiss-node\\.node)|(mkl_sequential\\.2\\.dll)|(faiss\\.lib)|(libfaiss\\.a)|(libmkl_intel_lp64\\.so)|(libmkl_sequential\\.so)|(libmkl_core\\.so)|(libomp\\.dylib)|(libgomp\\.so\\.1)|(libopenblas\\.so\\.3)|(libgfortran\\.so\\.5)|(libquadmath\\.so\\.0)$\" --backend cmake-js", | ||
"prebuild-package": "prebuild --verbose --runtime napi --include-regex \"^(faiss-node\\.node)|(mkl_sequential\\.2\\.dll)|(faiss\\.lib)|(libfaiss\\.a)|(libmkl_intel_lp64\\.so)|(libmkl_sequential\\.so)|(libmkl_core\\.so)|(libomp\\.dylib)|(libgomp\\.so\\.1)|(libopenblas\\.so\\.3)|(libopenblas\\.so\\.0)|(libgfortran\\.so\\.5)|(libquadmath\\.so\\.0)$\" --backend cmake-js", | ||
"install": "prebuild-install --runtime napi --verbose || (npm i cmake-js && npm run build)", | ||
@@ -26,0 +26,0 @@ "test": "jest", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30394
204
10