Skip to content

Commit

Permalink
use custom prebuild version for better compression
Browse files Browse the repository at this point in the history
  • Loading branch information
arition committed Sep 13, 2021
1 parent 8be97a8 commit 22fbaaa
Show file tree
Hide file tree
Showing 3 changed files with 755 additions and 728 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,11 @@ set(PYTORCH_VISION_VERSION 0.10.0)
find_package(CUDA)
if(CUDA_FOUND)
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build/libtorch")
if(${CUDA_VERSION_MAJOR} EQUAL 10 AND ${CUDA_VERSION_MINOR} EQUAL 2)
if(WIN32)
file(DOWNLOAD https://download.pytorch.org/libtorch/cu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}/libtorch-win-shared-with-deps-${PYTORCH_VERSION}.zip ${CMAKE_CURRENT_SOURCE_DIR}/libtorch-cu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}.zip SHOW_PROGRESS)
else()
file(DOWNLOAD https://download.pytorch.org/libtorch/cu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}/libtorch-cxx11-abi-shared-with-deps-${PYTORCH_VERSION}.zip ${CMAKE_CURRENT_SOURCE_DIR}/libtorch-cu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}.zip SHOW_PROGRESS)
endif()
else()
if(WIN32)
file(DOWNLOAD https://download.pytorch.org/libtorch/cu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}/libtorch-win-shared-with-deps-${PYTORCH_VERSION}%2Bcu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}.zip ${CMAKE_CURRENT_SOURCE_DIR}/libtorch-cu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}.zip SHOW_PROGRESS)
else()
file(DOWNLOAD https://download.pytorch.org/libtorch/cu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}/libtorch-cxx11-abi-shared-with-deps-${PYTORCH_VERSION}%2Bcu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}.zip ${CMAKE_CURRENT_SOURCE_DIR}/libtorch-cu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}.zip SHOW_PROGRESS)
endif()
endif()
execute_process(
COMMAND unzip -o ${CMAKE_CURRENT_SOURCE_DIR}/libtorch-cu${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}.zip
)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arition/torch-js",
"version": "0.12.0",
"version": "0.12.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "Kittipat Virochsiri, arition, raghavmecheri",
Expand All @@ -26,6 +26,7 @@
]
},
"devDependencies": {
"@arition/prebuild": "^10.1.0",
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@jest/globals": "^27.1.0",
Expand All @@ -40,14 +41,13 @@
"husky": "^7.0.2",
"jest": "^27.1.0",
"lint-staged": "^11.1.2",
"prebuild": "^10.0.1",
"prettier": "^2.2.1"
},
"dependencies": {
"@arition/prebuild-install": "^6.1.5",
"bindings": "^1.5.0",
"cmake-js": "^6.1.0",
"node-addon-api": "^4.1.0",
"prebuild-install": "^6.0.0",
"typescript": "^4.1.3"
},
"binary": {
Expand Down
Loading

0 comments on commit 22fbaaa

Please sign in to comment.