Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make tensorflow an optional dependency #8986

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

nvisser
Copy link
Contributor

@nvisser nvisser commented Jul 12, 2022

What

Misskey will not build on platforms that tensorflow does not support (arm64 etc.) This change makes tensorflow an optional dependency, together with #8984 Misskey can build and run on unsupported platforms.

Why

Misskey will not build on platforms that tensorflow does not support (arm64 etc.)

Additional info (optional)

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Jul 12, 2022
@nvisser nvisser changed the title Make tensorflow an optinal dependency fix: Make tensorflow an optinal dependency Jul 12, 2022
@nvisser nvisser changed the title fix: Make tensorflow an optinal dependency fix: Make tensorflow an optional dependency Jul 12, 2022
@rinsuki rinsuki requested a review from syuilo July 12, 2022 18:34
@syuilo syuilo merged commit 947f079 into misskey-dev:develop Jul 13, 2022
@syuilo
Copy link
Member

syuilo commented Jul 13, 2022

nice

@nvisser nvisser deleted the optional-tensor branch July 13, 2022 13:33
@tamaina
Copy link
Contributor

tamaina commented Jul 14, 2022

なんか完全な解決になっていない気がする(実行時に@tensorflow/tfjsがないと言われてコケる、@tensorflow/tfjsをoptionalDependenciesに追加すると今度はlongがないと言われてあきらめた)

@nvisser
Copy link
Contributor Author

nvisser commented Jul 14, 2022

なんか完全な解決になっていない気がする(実行時に@tensorflow/tfjsがないと言われてコケる、@tensorflow/tfjsをoptionalDependenciesに追加すると今度はlongがないと言われてあきらめた)

エラーメッセージの全文を掲載していただけませんか?私のARM64マシンでは、依存関係のインストールとビルドは問題なく行われました。

grainrigi added a commit to grainrigi/misskey that referenced this pull request Nov 20, 2022
Fixes misskey-dev#9202

Since '@tensorflow/tfjs-node' is moved into optionalDependencies in misskey-dev#8986,
'@tensorflow/tfjs', a peer dependency of 'nsfwjs',
won't be installed when optionalDeps are skipped.
This was causing missing module error during the server boot.

To fix this, we add '@tensorflow/tfjs' as a normal dependency.
This won't break non tensorflow capable platform
since this package does not require any prebuilt binaries to be installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants