Installation

This part of the documentation covers the installation of mimircache. Mimircache currently has the following dependencies:

pkg-config, glib, scipy, numpy, matplotlib

mimircache has been tested on python3.4 and python3.5. Theoretically, python3.3 and above are all supported. Mac Users: if you don’t know how to install these packages, try macports or homebrew, google will help you.

General Installation(pip)

Using pip3 is the preferred way for installing mimiracache, notice that mimircache does not support python2.

First Step: Install C Library

The first step is to use any package management software to install pkg-config and glib.

Second Step: Install Python Dependencies

Using pip3 to install python dependencies:

$ sudo pip3 install matplotlib heapdict

Third Step: pip Install mimircache

To install mimircache, simply run this command in your terminal of choice:

$ sudo pip3 install mimircache

Install From Source

This is an alternative method, only use this one when you can’t install using the methods above, or you want to try the newest feature of mimircache, notice that, it might have bugs in newest version, we highly recommend you to use the stable version from pip3.

Install All Dependencies

Installing all dependencies is the same as the one described above.

Get the Source Code

mimircache is actively developed on GitHub, where the code is always available here.

You can clone the public repository:

$ git clone -b master git://github.com/1a1a11a/mimircache.git

Once you have a copy of the source, you can install it into your site-packages easily:

$ sudo python3 setup.py install

Use Docker Container

As an alternative, you can using mimircache in a docker container,

Use interactive shell

To enter an interactive shell and do plotting, you can use:

sudo docker run -it --rm -v $(pwd):/mimircache/scripts -v PATH/TO/DATA:/mimircache/data 1a1a11a/mimircache /bin/bash

After you run this command, you will be in a shell with everything ready, your current directory is mapped to /mimircache/scripts/ and your data directory is mapped to /mimircache/data. In addition, we have prepared a test dataset for you at /mimircache/testData.

Run scripts directly

If you don’t want to use an interactive shell and you have your script ready, then you can do:

docker run --rm -v $(pwd):/mimircache/scripts -v PATH/TO/DATA:/mimircache/data 1a1a11a/mimircache python3 /mimircache/scripts/YOUR_PYTHON_SCRIPT.py

However, if you are new here or you have trouble using docker to run scripts directly, we suggest using interactive shell which can help you debug.

Special Instructions for Installing on Ubuntu

First Step: Install Python3, pip and all dependencies

Note

If you are using Ubuntu 14 and above, you can jump to here

However, if you are using Ubuntu 12, you need to do the first step. Since Ubuntu 12 does not come with Python3 or above and some related components like pip. You can either compile python3 from source or add the repository from Ubuntu 14 into your source list. Below is the instructions for using Ubuntu 14 repository to install python3 and pip.

Add the following two lines to the top of /etc/apt/source.list

deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse

Then update your repository by:

$ sudo apt-get update

If you are using Ubuntu 14 and above, start here, Ubuntu 12 continues here:

Now install python3, python3-pip and all dependencies:

$ sudo apt-get install python3 python3-pip python3-matplotlib pkg-config libglib2.0-dev

Second Step: Install mimircache

$ sudo pip3 install mimircache

Congratulations! You have finished installation, welcome to the world of mimircache