Skip to content
Prev Previous commit
Next Next commit
Fix nightly trying to build tfjs-node with docker
  • Loading branch information
mattsoulanille committed Oct 11, 2022
commit acb45d246e617152c229d4e7d8fa58cabeaefc3f
4 changes: 2 additions & 2 deletions tfjs-node-gpu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"build-deps": "yarn build-link-package && yarn build-union",
"build-deps-ci": "yarn build-link-package && yarn build-union-ci",
"build-npm": "yarn prep-gpu && ./scripts/build-npm.sh",
"build-addon": "./scripts/build-and-upload-addon.sh",
"build-and-upload-addon": "./scripts/build-and-upload-addon.sh",
"build-addon-from-source": "node-pre-gyp install --build-from-source",
"clean-deps": "rm -rf deps && rm -rf lib",
"coverage": "nyc yarn ts-node -P tsconfig.test.json src/run_tests.ts",
Expand All @@ -37,7 +37,7 @@
"prep-gpu": "./prep-gpu.sh",
"prep-gpu-windows": "./prep-gpu-windows.bat",
"publish-local": "yarn prep && yalc push",
"publish-npm": "yarn build-addon publish && npm publish",
"publish-npm": "yarn build-and-upload-addon publish && npm publish",
"test": "yarn && yarn build-deps && yarn build && ts-node --transpile-only --skip-ignore -P tsconfig.test.json src/run_tests.ts",
"test-dev": "tsc && ts-node --transpile-only --skip-ignore -P tsconfig.test.json src/run_tests.ts",
"test-ci": "ts-node --transpile-only --skip-ignore -P tsconfig.test.json src/run_tests.ts",
Expand Down
12 changes: 2 additions & 10 deletions tfjs-node/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Publishing this package requires uploading objects to GCP bucket. Developers nee
#### Build and upload node addon to Google Cloud Platform

```sh
$ yarn build-addon cpu for-publish
$ yarn build-and-upload-addon publish
```

This command will compile, compress, and upload a new node addon to GCP bucket. Please read [build-and-upload-addon.sh](./scripts/build-and-upload-addon.sh) for details.
Expand All @@ -90,15 +90,7 @@ This command will compile, compress, and upload a new node addon to GCP bucket.
$ yarn build-npm
```

This command will build a new version of tfjs-node/tfjs-node-gpu NPM tarball. NOTE: this command does not update the pre-compiled node addon to GCP (see `yarn build-addon upload`).

#### Build NPM package and upload node addon

```sh
$ yarn build-npm upload
```

This command combines the above two commands.
This command will build a new version of tfjs-node/tfjs-node-gpu NPM tarball. NOTE: this command does not update the pre-compiled node addon to GCP (see `yarn build-and-upload-addon publish`).

#### Publish NPM package

Expand Down
4 changes: 2 additions & 2 deletions tfjs-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"build-deps": "yarn build-link-package && yarn build-union",
"build-deps-ci": "yarn build-link-package && yarn build-union-ci",
"build-npm": "./scripts/build-npm.sh",
"build-addon": "./scripts/build-and-upload-addon.sh",
"build-and-upload-addon": "./scripts/build-and-upload-addon.sh",
"build-addon-from-source": "node-pre-gyp install --build-from-source",
"clean-deps": "rm -rf deps && rm -rf lib",
"coverage": "nyc yarn ts-node -P tsconfig.test.json src/run_tests.ts",
Expand All @@ -35,7 +35,7 @@
"lint": "tslint -p . -t verbose",
"prep": "cd node_modules/@tensorflow/tfjs-core && yarn && yarn build",
"publish-local": "yarn prep && yalc push",
"publish-npm": "yarn build-addon publish && npm publish",
"publish-npm": "yarn build-and-upload-addon publish && npm publish",
"test": "yarn && yarn build-deps && yarn build && ts-node --transpile-only --skip-ignore -P tsconfig.test.json src/run_tests.ts",
"test-dev": "tsc && ts-node --transpile-only --skip-ignore -P tsconfig.test.json src/run_tests.ts",
"test-ci": "ts-node --transpile-only --skip-ignore -P tsconfig.test.json src/run_tests.ts",
Expand Down
2 changes: 1 addition & 1 deletion tfjs-node/scripts/build-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ yarn rimraf deps/
yarn rimraf lib/

# Build the pre-built addon. Do not publish it yet.
yarn build-addon
yarn build-addon-from-source

tsc --sourceMap false
# Manual copy src/proto/api_pb.js until both allowJs and declaration are
Expand Down