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

reproducibility #16

Open
4 of 6 tasks
KiaraGrouwstra opened this issue Jan 26, 2020 · 2 comments
Open
4 of 6 tasks

reproducibility #16

KiaraGrouwstra opened this issue Jan 26, 2020 · 2 comments

Comments

@KiaraGrouwstra
Copy link
Owner

KiaraGrouwstra commented Jan 26, 2020

  • docker
  • nix
  • docker + stack + nix needs a Nix declaration
  • add dependency versions to version control / include deps in nix
  • seeds
    • this seemed broken for Gen?
    • ATen.manual_seed_L seed
    • Torch.Typed.Factories (unlike Torch.Random) seems to lack seed (Generator) parameters?
@KiaraGrouwstra
Copy link
Owner Author

Building through Nix works using stack --nix build instead of stack build.

Docker also works; you can install deps from a base image, then rebuild the top image on code changes. This is a compromise, as Stack hates volume mounting, erroring with:

Preventing creation of stack root '/root/.stack/'. Parent directory '/root/' is owned by someone else.

@KiaraGrouwstra
Copy link
Owner Author

KiaraGrouwstra commented Feb 13, 2020

Tensorflow Docker actually offers good info on volume mounting:

WARNING: You are running this container as root, which can cause new files in
mounted volumes to be created as the root user on your host machine.

To avoid this, run the container by specifying your user's userid:

$ docker run -u $(id -u):$(id -g) args...

This yields me an error however:

[kiara@klink synthesis]$ docker run -u $(id -u):$(id -g) -v $PWD:/app -ti synthesis stack test
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "chdir to cwd (\"/root\") set in config.json failed: permission denied": unknown.
ERRO[0001] error waiting for container: context canceled 

This appears related to file permissions. I tried a sudo chmod a+rw stack.yaml.lock to ensure all (top-level?) files are legible, but to no avail.

Edit: my synthesis-mount docker image seems not to run into that, but now I'm back at the Stack volume mounting issue mentioned above...

$ docker run -u $(id -u):$(id -g) -v ~/.stack:/root/.stack -v $PWD:/app -ti synthesis-mount stack test
Preventing creation of stack root '/.stack/'. Parent directory '/' is owned by someone else.

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

No branches or pull requests

1 participant