Hi,
I am trying to download some assignments off of the Jupyter server by creating a new archive .tar.gz file so that I do not need to download each file one at a time. To do this I enter the command
tar -czf <archive.tar.gz> <assignment_folder>
in the Jupyter terminal.
This methods however doesn’t work for some assignments in course 4, i.e. W2A1, W3A2 and W4A2. When I go to the terminal for these assignments this is what I see:
I suspect that this is because at that point I am not into the “standard” jupyter" kernel since for all other assignments this is the terminal I see (and where the archive command works):
Thus, does anybody know how to download all files from these assignments at once since doing it one file at a time is very tedious (there’s more than hundreds of files in the data folders for these assignments).
Thank you!
1 Like
Those instructions are generic and it turns out they don’t cover the case in which the file tree contains linux symlinks which point outside the tree you are archiving. Some of the DLS assignments do have such symlinks. The way to cope with that is to add the “h” option on tar, which tells it to “chase” symlinks. So instead of “czf”, try “chzf”. Here’s a local thread which goes into more detail.
Also note that if you are a newbie with the linux shell, then this is not going to be easy. You need to know enough about how to explore a linux file system to figure out if the terminal window you get happens to have a relevant “current working directory”. Not all of them do, so you need to be able to “cd” around and find the right subdirectory containing the assignment files.
1 Like
It worked well thank you!
Hi, Paul,
I don’t mean to reintroduce a solved topic, but I don’t know how to get a terminal on the jupyter notebook we are using online. Like many people have mentioned, I am just trying to get the resnet50.h5 file which is symlinked to /tf-ro/W2A1/resnet50.h5 which I can see by running !ls -l in the browser online notebook. Like many people, I just want to be able to download the code so I can work on it and try different things out without messing with the original notebook.
There is now an easy way to download all the files associated with any assignment. See the FAQ Thread for the link.
In terms of getting a terminal, I can show some screenshots for how to do that, if you still care after seeing the download info above.
Hi, Paul. The “Lab Files” was exactly what I needed. Thanks a lot!
I do remain curious about how to get a terminal while running a notebook, so I would like you to show me how to that. Most queries I’ve googled show how to run the notebook from the terminal, which I already know. Again, Thanks.
If you click “File → Open” from any notebook, it takes you to this “file explorer” view:
If you click the “New” menu highlighted in the rectangle, you’ll get a menu that includes “Terminal” as one of the choices.
The one other caveat is that the current working directory you will have in that initial terminal may or may not have any relation to where the actual assignment files are in the file system tree of that particular Docker Image. For some mysterious reason, in some of the assignments, you end up in a home directory different than where the actual assignment files are. If you have the linux chops, you’ll recognize the significance of the following command, which is useful in that context:
find / -name "*.ipynb"
1 Like
Hey, Paul. That worked! I am an old-school command line guy, so just being able to see the directory structure and files will be really helpful. I was able to find my notebook just as you described. Thats a lot!
Indeed, the shell is a “happy place” for me as well. I remember learning Unix back in the early 1980s and being amazed at how much you can accomplish with the various commands and by using pipelines. That was long before linux was even a gleam in Linus’s eye!
1 Like