This repository contains files used in the course "Biomedical Data Bases" (BDB) at the University of Bologna, Academic Year 2020-2021, taught by prof. Davide Salomoni.
For details, see the course slides.
For more information on the course, see here.
Refer to the course slides for information on how to do that.
We are going to create a directory local to our laptop/PC called bdb.
mkdir $HOME/bdb
mkdir %USERPROFILE%\bdb
This is a Docker virtual network used by the containers that you will instantiate in this course.
docker network create bdb-net
Remember to change the password to access Jupyter (parameter JUPYTER_TOKEN
in the command below). Once the Docker container is started,
connect to http://127.0.0.1:8888. Note that with the command below access is only permitted from the PC where Docker is running.
docker run -d --rm --name my_jupyter -v $HOME/bdb:/home/jovyan -p 127.0.0.1:8888:8888 --network bdb-net -e JUPYTER_TOKEN="bdb_password" --user root -e CHOWN_HOME=yes -e CHOWN_HOME_OPTS="-R" jupyter/datascience-notebook
docker run -d --rm --name my_jupyter -v %USERPROFILE%\bdb:/home/jovyan -p 127.0.0.1:8888:8888 --network bdb-net -e JUPYTER_TOKEN="bdb_password" --user root -e CHOWN_HOME=yes -e CHOWN_HOME_OPTS="-R" jupyter/datascience-notebook
docker run -d --rm --name my_redis -v $HOME/bdb:/data --network bdb-net --user 1000 redis redis-server --maxmemory 32mb --maxmemory-policy allkeys-lru
docker run -d --rm --name my_redis -v $HOME/bdb:/data --network bdb-net --user 1000 redis redis-server --maxmemory 32mb --save 180 1 --dbfilename my_database.rdb
docker run -d --rm --name my_redis -v %USERPROFILE%\bdb:/data --network bdb-net --user 1000 redis redis-server --maxmemory 32mb --maxmemory-policy allkeys-lru
docker run -d --rm --name my_redis -v %USERPROFILE%\bdb:/data --network bdb-net --user 1000 redis redis-server --maxmemory 32mb --save 180 1 --dbfilename my_database.rdb
- Make sure you type the
docker run
commands exactly as written in these instructions. - Double check that you have create the Docker virtual network with the
docker network create
command above. - Pay special attention to the the single quote (') and double quote (") characters, since they are prone to be copied wrongly with "copy/paste" actions. If you copy/paste the commands above, manually type any single of double quote characters.
docker run
returns docker: Error response from daemon: Conflict. The container name "/my_jupyter" is already in use ...
- Type
docker stop my_jupyter
- Type
docker rm my_jupyter
- Type the
docker run
command again.
If on Windows you get an error like the following when typing a docker run
command:
Error response from daemon: error while creating mount source path ... file exists.
you should restart the Docker daemon. Open the "Docker Desktop" application from the Windows main menu. If any updates to Docker are mentioned, apply them. After these updates (if any), make sure you select the option to restart the Docker daemon. Then issue the docker run
command again.
If you encounter other errors, contact prof. Salomoni through the usual University channels.