fix: load model fail on windows #4437
Merged
+35
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
This pull request aims to resolve the issue where the app fails to load the model on Windows due to the absence of CUDA Shared Libraries since #4334.
Since those shared libraries are quite heavy, the proposed approach is to create symlinks to the user's extension installation folder so that the engine can load them accordingly. This update is quite similar to how we set up default local engine variants.
This PR also includes a minor improvement to run scripts to function on Windows development machines.
Proposed changes
This pull request includes several changes to improve cross-platform compatibility, add new dependencies, and enhance functionality. The most important changes include modifications to the
package.json
files to support platform-specific scripts, the addition of new dependencies, and updates to theindex.ts
file to create symbolic links for shared libraries.Cross-platform compatibility improvements:
electron/package.json
: Split thedev
script intodev:darwin:linux
anddev:windows
for platform-specific development commands and addedrun-script-os
for handling platform-specific scripts.extensions/engine-management-extension/package.json
: Added platform-specificcodesign
scripts and updated thebuild:publish
script to userun-script-os
for platform-specific code signing.Dependency additions:
electron/package.json
: Addedjq
dependency for JSON processing in scripts.extensions/engine-management-extension/package.json
: Addedrun-script-os
dependency for handling platform-specific scripts.Functionality enhancements:
extensions/inference-cortex-extension/src/node/index.ts
: Added functions to create symbolic links for shared libraries and updated therun
function to set the working directory to the shared path. [1] [2] [3]Dependency removals:
package.json
: Removedrun-script-os
dependency as it is no longer needed.