-
Notifications
You must be signed in to change notification settings - Fork 1.9k
TF package size fix #3983
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
TF package size fix #3983
Conversation
Merging to personal fork
Syncing upstream fork
Checked in a better fix based on code review (#3896)
Syncing upstream fork
Syncing upstream fork
@@ -9,20 +9,12 @@ | |||
<TensorFlowConfig Include="windows" FileExtension=".zip" FilesFromArchive="lib\tensorflow.dll;include\tensorflow\c\LICENSE" Runtime="win-x64"/> | |||
<TensorFlowConfig Include="linux" FileExtension=".tar.gz" | |||
FilesFromArchive="lib\libtensorflow.so; | |||
lib\libtensorflow.so.$(TensorFlowMajorVersion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all these dynamic libraries not necessary then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The binaries deleted are identical to the ones remaining. They are symlinked in the tar file. But when they get to the nuget package, they become copies.
This change keeps only the ones that are used.
@@ -9,20 +9,12 @@ | |||
<TensorFlowConfig Include="windows" FileExtension=".zip" FilesFromArchive="lib\tensorflow.dll;include\tensorflow\c\LICENSE" Runtime="win-x64"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could you format the windows config the same way you did below for linux and mac?
Not important if you are not doing another iteration.
* Reduced list of TF binaries to only the essential ones * Fixed formatting
The Tensorflow tar files contain libtensorflow.so, libtensorflow.so.$(MajorVersion) and libtensorflow.so.$(Version). Of these, the first two are symlinked to the third. When these files get copied over to the nuget package, they are copied as files and not as symlinks which causes the package size to almost triple.
This fix reduces the copied files to only libtensorflow.so and libtensorflow_framework.so.$(MajorVersion).