We also provide a Dockerfile to run MorphQ in a Docker container.
- To build the Docker image, run the following command:
docker build -t morphq .
- To run the Docker container, run the following command:
docker run -it --rm -p 8888:8888 morphq
Optionally: To avoid the build process, you can also use the ready made Docker image from Docker Hub:
docker run -it --rm -p 8888:8888 mattepalte/morphq:latest
- To run the notebook in the Docker container, run the following command:
jupyter notebook --allow-root --no-browser --ip=0.0.0.0 --port=8888
- Then open the link that is printed in the terminal in your browser. Note that the link will look something like this:
http://127.0.0.1:8888/?token=6819f647f19859d9e92013a41f52f49d6ffed633e7b68657
. - Open the
notebooks/RQs_Reproduce_Analysis_Results_Level_1.ipynb
notebook. - Run the notebook top-to-bottom.
- Congratulations! You reproduced all the paper figures based on our experimental data.
- Generate a new configuration file with the following command:
python3 -m lib.generate_new_config --version 01
- Select
morphq_demo.yaml
as the base configuration file. - Run the following command to run MorphQ with the new configuration:
python3 -m lib.qmt config/qmt_v01.yaml
- Congratulations! You successfully run MorphQ.
Persisting Data
Note that your newly generated data will be transient in this Docker, thus if you are interested in accessing them need to mount a folder on your host mahcine (aka laptop) as a volume in the docker container.
Follow these steps, while in the root folder of the cloned repository:
- Create a data folder to store all the docker generated data:
mkdir data_docker
- Run the following command to run MorphQ with the new configuration (if you use another OS instead of Ubuntu, the syntax might be a little different, see this link):
docker run -it --rm -p 8888:8888 -v $(pwd)/data_docker:/opt/data mattepalte/morphq:latest
- Run the steps in Level 2 above:
python3 -m lib.generate_new_config --version 01 # select morphq_demo.yaml as the base configuration file python3 -m lib.qmt config/qmt_v01.yaml
- When enough data is generated, stop MorphQ by pressing
Ctrl+C
, and typeexit
to exit the docker container. - You can now access the data in the
data_docker
folder on your laptop even when the docker is not running.