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

tensorflow: workaround tensorboard collision due to upstream pip hack #44381

Merged
merged 1 commit into from Aug 3, 2018

Conversation

twhitehead
Copy link
Contributor

Motivation for this change

Fails to work with python.withPackages

nix-build -E 'with import ./. { }; python.withPackages (p: with p; [tensorflow])'
building '/nix/store/zj8adg9ri2jfmr0xg86rlk0i9nk0sw85-python-2.7.15-env.drv'...
collision between `/nix/store/z9a2y31akz53df8g9d6f5klr7kdzgmvb-python2.7-tensorflow-tensorboard-1.7.0/bin/.tensorboard-wrapped' and `/nix/store/wmxg0d5zw88a9m8zk1pmza3ga05npgzc-python2.7-tensorflow-1.7.1/bin/.tensorboard-wrapped'
builder for '/nix/store/zj8adg9ri2jfmr0xg86rlk0i9nk0sw85-python-2.7.15-env.drv' failed with exit code 25
error: build of '/nix/store/zj8adg9ri2jfmr0xg86rlk0i9nk0sw85-python-2.7.15-env.drv' failed

issue is upstream lists the command tensorboard as a utility from tensorflow despite it being provided by tensorboard to stop pip for deleting it. This causes the python.withPackages collisions between the two. The work around is to just delete it from tensorflow as a postFixup step.

#31492 (comment)
#31492 (comment)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

in
lib.optionalString (stdenv.isLinux) ''
in ''
rm $out/bin/tensorboard $out/bin/.tensorboard-wrapped
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also just do rm $out/bin/tensorboard in postInstall?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's cleaner all right. Thanks! I've pushed a new version.

Upstream lists tensorboard as a utility from tensorflow despite it
being provided by tensorboard to stop pip for deleting it.  This
causes python.withPackages collisions between the two.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants