Exasol AI-Lab comes with a set of Jupyter Notebook Files with file extension .ipynb
demonstrating AI applications on top of the Exasol database. Additionally, the demos in the Exasol AI-Lab require some credentials and other configuration strings which are managed in a Secure Configuration Storage (SCS).
By default, the AI-Lab will instantiate the notebook files with a predefined content. The predefined content may change with each release of the AI-Lab. However, the AI-Lab won't overwrite existing files.
The SCS on the other hand will be populated by the Exasol AI-Lab, including manual input from the user but also entries generated by the Exasol AI-Lab.
Command line option --volume
allows you to
- Keep your data and changes in these files
- Reuse modified files in future sessions
- Backup and restore the files
See User Guide for the AI-Lab Docker Edition.
In order to save your changes persistently, to reuse, backup, and restore them, the AI-Lab
- Keeps the notebook files as well as the SCS in the directory
/home/jupyter/notebooks
inside the Docker container - Uses a so-called Docker Volume mounted to
/home/jupyter/notebooks
to store the content independent of the Docker container
Following the general User Guide for the AI-Lab Docker Edition this document uses some additional environment variables:
- Variable
VOLUME
is expected to contain the name of your Docker volume. - Variable
DIR
is expected to point to a directory to contain your backup.
Here are some sample values — please change to your needs:
VOLUME=my-vol
DIR=~/tmp/backup
See also Back up a volume in official Docker documentation.
The following Unix shell commands will
- Run a Docker container
- Mount your volume
- Copy the contents of your volume to directory
$DIR
- Remove the container
To ensure a consistent backup we recommend stopping the AI-Lab Docker container before creating a backup.
C=$(docker run --detach -v ${VOLUME}:/notebooks ubuntu sleep infinity)
docker cp ${C}:/notebooks ${DIR}
docker rm -f ${C}
unset C
See also Restore volume from a backup in official Docker documentation.
To ensure consistent results, we recommend stopping the AI-Lab Docker container before restoring the volume contents.
The following Unix shell commands will
- Run a Docker container
- Mount your volume
- Copy the contents of directory
$DIR
into your volume - Remove the container
C=$(docker run --detach -v ${VOLUME}:/notebooks ubuntu sleep infinity)
docker cp ${DIR}/notebooks ${C}:/
docker rm -f ${C}
unset C
In order to use notebook files of a newer version of the AI-Lab you must use a different Docker volume. Otherwise, the newer version will still display the old notebooks contained in your Docker volume.
You can also delete the old volume. If you modified some of the files, then please consider making a backup first.
Docker volumes can only be deleted if there aren't any Docker containers using them.
Use the following command to find out the ID of existing Docker containers, including the stopped ones, see also User Guide for AI-Lab Docker edition:
docker ps --all
The following commands will remove the container with name ${CONTAINER_NAME}
and the volume with the name ${VOLUME}
:
docker rm -f ${CONTAINER_NAME}
docker volume rm -f ${VOLUME}