Skip to content

Commit

Permalink
Merge pull request #7 from jburel/binder
Browse files Browse the repository at this point in the history
Binder
  • Loading branch information
jburel committed Apr 17, 2020
2 parents 7a484b3 + 0146e86 commit 1b689fb
Show file tree
Hide file tree
Showing 8 changed files with 486 additions and 7 deletions.
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
# This is a template useful to create guides
# Guide on how to integrate ilastik and OMERO
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ome/omero-guide-ilastik/master?filepath=notebooks)

This guide demonstrates how to use ilastik to analyze data stored in [IDR](https://idr.openmicroscopy.org/) or an OMERO server.

This repository contains documentation and notebooks.

To run the notebooks, you can either [run on mybinder.org](https://mybinder.org/v2/gh/ome/omero-guide-ilastik/master?filepath=notebooks) or build locally with [repo2docker](https://repo2docker.readthedocs.io/).

To build locally:

* Install [Docker][https://www.docker.com/] if required
* Open a terminal as administrator
* Create a virtual environment and install repo2docker from PyPI.
* Clone this repository
* Run ``repo2docker``

```
pip install jupyter-repo2docker
git clone https://github.com/ome/omero-guide-ilastik.git
cd omero-guide-ilastik
repo2docker .
```

This a Sphinx based documentation.
If you are unfamiliar with Sphinx, we recommend that you first read
[Getting Started with Sphinx](https://docs.readthedocs.io/en/stable/intro/getting-started-with-sphinx.html).

When creating a new repository, this template could be used.

The values in ``docs/conf.py`` should be replaced by the name of your project.
1 change: 1 addition & 0 deletions binder/apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libgl1-mesa-glx
11 changes: 11 additions & 0 deletions binder/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
channels:
- conda-forge
- ome
- ilastik-forge
dependencies:
- zeroc-ice36-python
- omero-py
- pip
- ilastik-dependencies-no-solvers
- ilastik-meta
- ipywidgets
4 changes: 4 additions & 0 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -eux

chmod -R +x /srv/conda/envs/notebook/ilastik-meta
Binary file added docs/images/terminal.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ ilastik is a free open-source interactive learning and segmentation toolkit, wit
Contents:

.. toctree::
:maxdepth: 1

setup
ilastik
:maxdepth: 1
61 changes: 61 additions & 0 deletions docs/setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Install ilastik and OMERO Python bindings
==========================================

In this section, we show how to install ilastik in a `Conda <https://conda.io/en/latest/>`_ environment.
We will use the ilastik API to analyze data stored in an OMERO server.

**Setup**
---------

We recommend to install the dependencies using Conda.
Conda manages programming environments in a manner similar to
`virtualenv <https://virtualenv.pypa.io/en/stable/>`_.

- Install `Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_ if necessary.

- If you do not have a local copy of the `omero-guide-ilastik repository <https://github.com/ome/omero-guide-ilastik>`_, first clone the repository::

$ git clone https://github.com/ome/omero-guide-ilastik.git

- Go into the directory::

$ cd omero-guide-ilastik

- Create a programming environment using Conda::

$ conda create -n ilastik python=3.6

- Install ilastik, its dependencies and ``omero-py`` in order to connect to an OMERO server using an installation file::

$ conda env update -n ilastik --file binder/environment.yml

- Activate the environment::

$ conda activate ilastik

Alternatively you can create a local Docker Image using ``repo2docker``, see :download:`README.md <https://github.com/ome/omero-guide-ilastik/blob/master/README.md>`::

$ repo2docker .

When the Image is ready:

- Copy the URL displayed in the terminal in your favorite browser

- Click the ``New`` button on the right-hand side of the window

- Select ``Terminal``

.. image:: images/terminal.png

- A Terminal will open in a new Tab

- A Conda environment has already been created when the Docker Image was built

- To list all the Conda environment, run::

$ conda env list

- The environment with ilastik and the OMERO Python bindings is named ``notebook``, activate it::

$ conda activate notebook

0 comments on commit 1b689fb

Please sign in to comment.