Bump nitro version to 0.3.18 (#2652)
This commit is contained in:
parent
c31a6ef4d3
commit
5fd6025175
@ -227,13 +227,9 @@ const executableNitroFile = (): NitroExecutableOptions => {
|
|||||||
binaryName = 'nitro.exe'
|
binaryName = 'nitro.exe'
|
||||||
} else if (process.platform === 'darwin') {
|
} else if (process.platform === 'darwin') {
|
||||||
/**
|
/**
|
||||||
* For MacOS: mac-arm64 (Silicon), mac-x64 (InteL)
|
* For MacOS: mac-universal both Silicon and InteL
|
||||||
*/
|
*/
|
||||||
if (process.arch === 'arm64') {
|
binaryFolder = join(binaryFolder, 'mac-universal')
|
||||||
binaryFolder = join(binaryFolder, 'mac-arm64')
|
|
||||||
} else {
|
|
||||||
binaryFolder = join(binaryFolder, 'mac-x64')
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/**
|
/**
|
||||||
* For Linux: linux-cpu, linux-cuda-11-7, linux-cuda-12-0
|
* For Linux: linux-cpu, linux-cuda-11-7, linux-cuda-12-0
|
||||||
|
|||||||
@ -32,13 +32,9 @@ export const getQuantizeExecutable = (): string => {
|
|||||||
binaryName = 'quantize.exe'
|
binaryName = 'quantize.exe'
|
||||||
} else if (process.platform === 'darwin') {
|
} else if (process.platform === 'darwin') {
|
||||||
/**
|
/**
|
||||||
* For MacOS: mac-arm64 (Silicon), mac-x64 (InteL)
|
* For MacOS: mac-universal both Silicon and InteL
|
||||||
*/
|
*/
|
||||||
if (process.arch === 'arm64') {
|
binaryFolder = pjoin(binaryFolder, 'mac-universal')
|
||||||
binaryFolder = pjoin(binaryFolder, 'mac-arm64')
|
|
||||||
} else {
|
|
||||||
binaryFolder = pjoin(binaryFolder, 'mac-x64')
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
binaryFolder = pjoin(binaryFolder, 'linux-cpu')
|
binaryFolder = pjoin(binaryFolder, 'linux-cpu')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
0.3.14
|
0.3.18
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
@echo off
|
@echo off
|
||||||
set /p NITRO_VERSION=<./bin/version.txt
|
set /p NITRO_VERSION=<./bin/version.txt
|
||||||
.\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/win-cuda-12-0 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-11-7.tar.gz -e --strip 1 -o ./bin/win-cuda-11-7 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64.tar.gz -e --strip 1 -o ./bin/win-cpu && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-vulkan.tar.gz -e --strip 1 -o ./bin/win-vulkan
|
.\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-avx2-cuda-12-0.tar.gz -e --strip 1 -o ./bin/win-cuda-12-0 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-avx2-cuda-11-7.tar.gz -e --strip 1 -o ./bin/win-cuda-11-7 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-avx2.tar.gz -e --strip 1 -o ./bin/win-cpu && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-vulkan.tar.gz -e --strip 1 -o ./bin/win-vulkan
|
||||||
|
|||||||
@ -9,8 +9,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
|
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
|
||||||
"downloadnitro:linux": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64.tar.gz -e --strip 1 -o ./bin/linux-cpu && chmod +x ./bin/linux-cpu/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/linux-cuda-12-0 && chmod +x ./bin/linux-cuda-12-0/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-11-7.tar.gz -e --strip 1 -o ./bin/linux-cuda-11-7 && chmod +x ./bin/linux-cuda-11-7/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-vulkan.tar.gz -e --strip 1 -o ./bin/linux-vulkan && chmod +x ./bin/linux-vulkan/nitro",
|
"downloadnitro:linux": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-avx2.tar.gz -e --strip 1 -o ./bin/linux-cpu && chmod +x ./bin/linux-cpu/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/linux-cuda-12-0 && chmod +x ./bin/linux-cuda-12-0/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-11-7.tar.gz -e --strip 1 -o ./bin/linux-cuda-11-7 && chmod +x ./bin/linux-cuda-11-7/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-vulkan.tar.gz -e --strip 1 -o ./bin/linux-vulkan && chmod +x ./bin/linux-vulkan/nitro",
|
||||||
"downloadnitro:darwin": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-mac-arm64.tar.gz -e --strip 1 -o ./bin/mac-arm64 && chmod +x ./bin/mac-arm64/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-mac-amd64.tar.gz -e --strip 1 -o ./bin/mac-x64 && chmod +x ./bin/mac-x64/nitro",
|
"downloadnitro:darwin": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-mac-universal.tar.gz -o ./bin/ && mkdir -p ./bin/mac-universal && tar -zxvf ./bin/nitro-${NITRO_VERSION}-mac-universal.tar.gz --strip-components=1 -C ./bin/mac-universal && rm -rf ./bin/nitro-${NITRO_VERSION}-mac-universal.tar.gz && chmod +x ./bin/mac-universal/nitro",
|
||||||
"downloadnitro:win32": "download.bat",
|
"downloadnitro:win32": "download.bat",
|
||||||
"downloadnitro": "run-script-os",
|
"downloadnitro": "run-script-os",
|
||||||
"build:publish:darwin": "rimraf *.tgz --glob && yarn build && npm run downloadnitro && ../../.github/scripts/auto-sign.sh && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish:darwin": "rimraf *.tgz --glob && yarn build && npm run downloadnitro && ../../.github/scripts/auto-sign.sh && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
||||||
|
|||||||
@ -29,32 +29,13 @@ describe('test executable nitro file', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('executes on MacOS ARM', () => {
|
it('executes on MacOS', () => {
|
||||||
Object.defineProperty(process, 'platform', {
|
Object.defineProperty(process, 'platform', {
|
||||||
value: 'darwin',
|
value: 'darwin',
|
||||||
})
|
})
|
||||||
Object.defineProperty(process, 'arch', {
|
|
||||||
value: 'arm64',
|
|
||||||
})
|
|
||||||
expect(executableNitroFile(testSettings)).toEqual(
|
expect(executableNitroFile(testSettings)).toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
executablePath: expect.stringContaining(`mac-arm64${sep}nitro`),
|
executablePath: expect.stringContaining(`mac-universal${sep}nitro`),
|
||||||
cudaVisibleDevices: '',
|
|
||||||
vkVisibleDevices: '',
|
|
||||||
})
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('executes on MacOS Intel', () => {
|
|
||||||
Object.defineProperty(process, 'platform', {
|
|
||||||
value: 'darwin',
|
|
||||||
})
|
|
||||||
Object.defineProperty(process, 'arch', {
|
|
||||||
value: 'x64',
|
|
||||||
})
|
|
||||||
expect(executableNitroFile(testSettings)).toEqual(
|
|
||||||
expect.objectContaining({
|
|
||||||
executablePath: expect.stringContaining(`mac-x64${sep}nitro`),
|
|
||||||
cudaVisibleDevices: '',
|
cudaVisibleDevices: '',
|
||||||
vkVisibleDevices: '',
|
vkVisibleDevices: '',
|
||||||
})
|
})
|
||||||
|
|||||||
@ -8,8 +8,8 @@ export interface NitroExecutableOptions {
|
|||||||
}
|
}
|
||||||
const runMode = (settings?: GpuSetting): string => {
|
const runMode = (settings?: GpuSetting): string => {
|
||||||
if (process.platform === 'darwin')
|
if (process.platform === 'darwin')
|
||||||
// MacOS use arch instead of cpu / cuda
|
// MacOS now has universal binaries
|
||||||
return process.arch === 'arm64' ? 'arm64' : 'x64'
|
return ''
|
||||||
|
|
||||||
if (!settings) return 'cpu'
|
if (!settings) return 'cpu'
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ const os = (): string => {
|
|||||||
return process.platform === 'win32'
|
return process.platform === 'win32'
|
||||||
? 'win'
|
? 'win'
|
||||||
: process.platform === 'darwin'
|
: process.platform === 'darwin'
|
||||||
? 'mac'
|
? 'mac-universal'
|
||||||
: 'linux'
|
: 'linux'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user