-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
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:
tfjs/tfjs-node/scripts/deps-stage.js
Lines 59 to 63 in d279946
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 anindex.js
that referencestfjs
- Run
index.js