System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Amazon Linux 2
- TensorFlow.js installed from (npm or script link):
"@tensorflow/tfjs-node": "^3.20.0"
- TensorFlow.js version:
"@tensorflow/tfjs-node": "^3.20.0"
- CUDA/cuDNN version: not appicable
Describe the problem
Symlinks seem to use an absolute path:
|
try { |
|
await symlink( |
|
path.relative( |
|
path.dirname(destLibTensorFlowPath), depsLibTensorFlowPath), |
|
destLibTensorFlowPath); |
I'm talking about the path parameter of fs.symlink, which is destLibTensorFlowPath here.
Using an absolute path prevents moving the node_modules folder, e.g. when packaging deployable archives for cloud use.
For instance and as an additional reference, npm copy will break tfjs-node when it lands in main.
Attempting to run tfjs will throw libtensorflow.so.2: cannot open shared object file: No such file or directory.
I have checked the symlinks and they are indeed invalid.
Symlinks can use a relative path, as seen in the first example at https://nodejs.org/api/fs.html#fssymlinktarget-path-type-callback.
Provide the exact sequence of commands / steps that you executed before running into the problem
- Install
tfjs-node
- Move
node_modules, package.json and an index.js that references tfjs
- Run
index.js
System information
"@tensorflow/tfjs-node": "^3.20.0""@tensorflow/tfjs-node": "^3.20.0"Describe the problem
Symlinks seem to use an absolute path:
tfjs/tfjs-node/scripts/deps-stage.js
Lines 59 to 63 in d279946
I'm talking about the
pathparameter offs.symlink, which isdestLibTensorFlowPathhere.Using an absolute path prevents moving the
node_modulesfolder, e.g. when packaging deployable archives for cloud use.For instance and as an additional reference, npm copy will break
tfjs-nodewhen it lands in main.Attempting to run
tfjswill throwlibtensorflow.so.2: cannot open shared object file: No such file or directory.I have checked the symlinks and they are indeed invalid.
Symlinks can use a relative path, as seen in the first example at https://nodejs.org/api/fs.html#fssymlinktarget-path-type-callback.
Provide the exact sequence of commands / steps that you executed before running into the problem
tfjs-nodenode_modules,package.jsonand anindex.jsthat referencestfjsindex.js