Lose all data when restarting container

I’m going through the “DLI Getting Started with AI on Jetson Nano”.

I can access the sample code and notebooks no problem over SSH and in my browser.

However, if I create a new Jupyter notebook and save it, and then restart the docker (or restart the device), all my saved notebooks are gone.

Any images I save using the tools are still on the device in the data folder.

Please help.

Hi @jdeglint, you would need to save your notebook (or other files you wanted to be persistent after shutting down the container) to a mounted directory - the data folder is mounted to the host.

You can see that data folder mounted with the --volume option in the command-line used to start the container:

sudo docker run --runtime nvidia -it --rm --network host \
    --volume ~/nvdli-data:/nvdli-nano/data \
    --device /dev/video0 \

You can create another directory on your device (outside of container) and mount it the same way (by specifying another --volume HOST_DIR:CONTAINER_DIR option). Or you can just use the existing data dir that’s already mounted.

Thanks for the quick reply!

Okay great. That makes sense.

I’m new to docker so I appreciate your help.