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

Use stack's nix support #168

Merged
merged 2 commits into from
May 25, 2018
Merged

Use stack's nix support #168

merged 2 commits into from
May 25, 2018

Conversation

nmattia
Copy link
Contributor

@nmattia nmattia commented Nov 12, 2017

This makes use of stack --nix instead of providing tools/userchroot. It provides a shell.nix that can be used but now the users can build with stack --nix build. For me stack --nix test works out of the box. The nix support is disabled by default in the stack.yaml, hence you do need to pass --nix to your stack commands.

This fixes a few issues I ran into while trying to build:

  • The nixpkgs version is pinned, with a script nix/update that will update the commit to the header of release-17.09.
  • The tensorflow library used is patched to ensure the libraries (libc, libstdc++) are present on the system.

AFAICT this removes the need for buildFHSUserEnv.

Now I need to figure out what that Google CLA is about...

@tensorflow-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@blackgnezdo
Copy link
Contributor

Thanks for the patch. Please sign CLA.

@grwlf who added nix support in the first place should probably take a look as I don't understand nor use Nix.

@nmattia
Copy link
Contributor Author

nmattia commented Nov 12, 2017

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@blackgnezdo
Copy link
Contributor

Jenkins test this please.

@traleig1
Copy link

This works fantastically, thanks

@jyp
Copy link

jyp commented May 15, 2018

What is blocking this to be merged? (Apart from the obvious conflict?) @grwlf ?

@fkm3
Copy link
Contributor

fkm3 commented May 16, 2018

I think we just want someone else nix literate to take a look. If you'd like to look over the code and give a thumbs up that should be good enough :)

@jyp
Copy link

jyp commented May 17, 2018

This PR is a definite improvement over what's currently in master. So I recommend merging it.
It needs to be rebased though. Mainly the version of tensorflow-c should be updated so that it would match the proto. Perhaps @nmattia can confirm.

@fkm3
Copy link
Contributor

fkm3 commented May 17, 2018

Thanks! @nmattia do you mind rebasing? (I think you just need to update the version in the tarball URL + its SHA)

@nmattia
Copy link
Contributor Author

nmattia commented May 17, 2018

Yep, will do. I should have a few free cycles tomorrow.

@nmattia
Copy link
Contributor Author

nmattia commented May 22, 2018

I've:

  • Updated to tensorflow 1.8.0
  • Added stack to the nix-shell (so that you don't even need stack installed)
  • Updated nixpkgs
  • Set GHC to 8.2.2 (the latest in nixpkgs is > 8.2.2 which doesn't work with the LTS)
  • Rebased

@jyp can you let me know if this still works for you? I don't have a global stack install, and adding stack to the nix-shell may cause issues there.

@jyp
Copy link

jyp commented May 23, 2018

@nmattia Thanks a lot; this is a very useful PR. (I don't have a global stack install either.)

Copy link
Contributor

@blackgnezdo blackgnezdo left a comment

Choose a reason for hiding this comment

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

This seems like an overall improvement, so let's merge it.

@blackgnezdo blackgnezdo merged commit 8e1d85b into tensorflow:master May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants