-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Mount notebooks into a mounted fs volume to avoid data loss #873
Conversation
Can one of the admins verify this patch? |
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! |
CLAs look good, thanks! |
@craigcitro any gotcha going down that route? |
No, these both seem pretty reasonable. Two thoughts:
|
@timothyjlaurent thanks for the fix. Would you mind changing the doc for the hosted container as well and removing the 'cd'? |
Ok @vincentvanhoucke I updated the readme. |
|
||
To avoid losing work between sessions in the container, it is recommended that you mount the `tensorflow/examples/udacity` directory into the container: | ||
|
||
docker run -p 8888:8888 -v </path/to/tesorflow/examples/udacity>:/notebooks -it --rm $USER/assignments |
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.
s/tesorflow/tensorflow/
I fixed the typo |
LGTM @vrv |
Thanks! Squash the commits and we'll merge. |
The current way this is done: ``` docker run -p 8888:8888 -it --rm $USER/assignments ``` creates an ephemeral container due to the `--rm` flag. In the first notebook you are doing very expensive operations (gunziping) several GBs. All of this data will be lost when the container shuts down. Using the filesystem as a mounted volume, allows subsequent sessions to have access to the files created (eg pickled data). This is especially important because this is course material so want to avoid time consuming gotchas. update readme Re ephemeral vs mounted notebooks dir
Commits have been squashed. There is one caveat to this PR -- if the user needs to rebuild the docker image -- all the files underneath will need to be added to the context for the build. This is several GB for the first assignment so it takes a LONG time. |
We aren't running any |
Merged. Thanks! |
Well in the readme it says:
If you use that same directory to mount the notebooks then it will fill up with data files. Then if you need to remake the image all of that will have to be put in the context. When I had to do this, I just moved the data directories temporarily to So maybe we should recommend copying the udacity dir to some work dir location and then mount that into the container or mention the issue with context and explain that they should move extraneous files elsewhere while rebuilding the image. |
I'm not sure why you, as a class user, would ever want to build the container? |
Arpan, there should be no need for anyone to build a container. Was the doc updated? |
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
If there is a hosted image that should be used for the class, the command should look something like this:
|
@timothyjlaurent Access to the hosted version is described on the first line in the document you edited: |
Oh I see it now that you point it out. Maybe the course should be updated to instruct users to use that image rather than build their own. |
Also now that I see the first line (although it wasn't shown in the course material) |
@timothyjlaurent we pushed some changes this weekend that should help with memory. |
Updated calls to '..._cross_entropy_with_logits' to add arguments
The current way this is done:
creates an ephemeral container due to the
--rm
flag. In the first notebook you are doing very expensive operations (gunziping) several GBs. All of this data will be lost when the container shuts down. Using the filesystem as a mounted volume, allows subsequent sessions to have access to the files created (eg pickled data). This is especially important because this is course material so want to avoid time consuming gotchas for the students.