... | ... | @@ -6,7 +6,11 @@ The most hands-off and OS-agnostic way to install `graph-tool` is using [Docker] |
|
|
```bash
|
|
|
docker pull tiagopeixoto/graph-tool
|
|
|
```
|
|
|
This will download a Docker image based on [Arch GNU/Linux](https://www.archlinux.org/), that contains graph-tool, and can be run in any modern GNU/Linux distribution, MacOS X and Windows. It contains some other useful Python packages, such as [matplotlib](http://matplotlib.org/) and [IPython](https://ipython.org/). After the image is pulled, you can start an interactive python shell in the container by running:
|
|
|
This will download a Docker image based on [Arch GNU/Linux](https://www.archlinux.org/), that contains graph-tool, and can be run in any modern GNU/Linux distribution, MacOS X and Windows. It contains some other useful Python packages, such as [matplotlib](http://matplotlib.org/), [Pandas](http://pandas.pydata.org/), [IPython](https://ipython.org/) and [Jupyter](https://jupyter.org/).
|
|
|
|
|
|
## Interactive sessions
|
|
|
|
|
|
After the image is pulled, you can start an interactive python shell in the container by running:
|
|
|
```bash
|
|
|
docker run -it tiagopeixoto/graph-tool ipython
|
|
|
```
|
... | ... | @@ -25,14 +29,28 @@ In [1]: from graph_tool.all import * |
|
|
In [2]:
|
|
|
```
|
|
|
|
|
|
### Interactive visualizations
|
|
|
|
|
|
If you want to use interactive visualization from within docker, you have first to enable local connections to the X server:
|
|
|
```
|
|
|
```bash
|
|
|
xhost +local:
|
|
|
```
|
|
|
and then run the container with
|
|
|
```
|
|
|
```bash
|
|
|
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix tiagopeixoto/graph-tool ipython
|
|
|
```
|
|
|
|
|
|
## Jupyter notebooks
|
|
|
|
|
|
To run jupyter notebooks from inside the docker image, you need to forward the necessary ports to the container, so that your native browser can connect to it at http://localhost:8888/:
|
|
|
|
|
|
```bash
|
|
|
docker run -p 8888:8888 -p 6006:6006 tiagopeixoto/graph-tool jupyter-notebook
|
|
|
```
|
|
|
|
|
|
(MacOS and Windows users still need to bind the above ports in the VM, as described [here](https://stackoverflow.com/questions/33636925/how-do-i-start-tensorflow-docker-jupyter-notebook))
|
|
|
|
|
|
## Modifying the docker image
|
|
|
If you are interested in modifying or extending the image, you can download the [Dockerfile](/uploads/caf47baea1a337cab16484e59a99615a/Dockerfile).
|
|
|
|
|
|
# Native installation
|
... | ... | |