File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
extensions/inference-cortex-extension Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1- 1.0.10-rc1
1+ 1.0.10-rc3
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ function run(): Promise<any> {
2727 const binPath = path . join ( __dirname , '..' , 'bin' )
2828
2929 const executablePath = path . join ( binPath , binaryName )
30+
31+ addEnvPaths ( binPath )
32+
3033 const sharedPath = path . join ( appResourcePath ( ) , 'shared' )
3134 // Execute the binary
3235 log ( `[CORTEX]:: Spawn cortex at path: ${ executablePath } ` )
@@ -75,6 +78,22 @@ function dispose() {
7578 watchdog ?. terminate ( )
7679}
7780
81+ /**
82+ * Set the environment paths for the cortex subprocess
83+ * @param dest
84+ */
85+ function addEnvPaths ( dest : string ) {
86+ // Add engine path to the PATH and LD_LIBRARY_PATH
87+ if ( process . platform === 'win32' ) {
88+ process . env . PATH = ( process . env . PATH || '' ) . concat ( path . delimiter , dest )
89+ } else {
90+ process . env . LD_LIBRARY_PATH = ( process . env . LD_LIBRARY_PATH || '' ) . concat (
91+ path . delimiter ,
92+ dest
93+ )
94+ }
95+ }
96+
7897/**
7998 * Cortex process info
8099 */
You can’t perform that action at this time.
0 commit comments