Skip to content

Commit

Permalink
Merge pull request #22 from jburel/issue_21
Browse files Browse the repository at this point in the history
Issue 21
  • Loading branch information
jburel committed May 3, 2023
2 parents 09b3cb8 + 339b6de commit f3f5297
Show file tree
Hide file tree
Showing 6 changed files with 366 additions and 367 deletions.
59 changes: 46 additions & 13 deletions README.md
Expand Up @@ -10,23 +10,56 @@ This guide demonstrates how to use the CellProfiler Python API to analyze data s

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-cellprofiler/master?filepath=notebooks) or build locally with [repo2docker](https://repo2docker.readthedocs.io/).
## Run the notebooks

### Running on cloud resources

To build locally:
[![Binder](https://mybinder.org/v2/gh/ome/omero-guide-cellprofiler/master?filepath=notebooks)

* Install [Docker](https://www.docker.com/) if required
* Create a virtual environment and install repo2docker from PyPI.
* Clone this repository
* Run ``repo2docker``.
* Depending on the permissions, you might have to run the command as an admin
The OMERO server used will need to have [websockets support](https://docs.openmicroscopy.org/omero/latest/sysadmins/websockets.html) enabled.

```
pip install jupyter-repo2docker
git clone https://github.com/ome/omero-guide-cellprofiler.git
cd omero-guide-cellprofiler
repo2docker .
```
### Running in Docker

Alternatively, if you have Docker installed, you can use the [repo2docker](https://repo2docker.readthedocs.io/en/latest/)
tool to run this repository as a local Docker instance:


$ git clone https://github.com/ome/omero-guide-cellprofiler
$ cd omero-guide-cellprofiler
$ repo2docker .

### Running locally

Finally, if you would like to install the necessary requirements locally,
we suggest using conda.

Then, create the environment:

$ git clone https://github.com/ome/omero-guide-cellprofiler
$ cd omero-guide-cellprofiler
$ conda env create -n omero-guide-cellprofiler -f binder/environment.yml

and activate the newly created environment:

$ conda activate omero-guide-cellprofiler

The following steps are only required if you want to run the notebooks

* If you have Anaconda installed:
* Start Jupyter from the Anaconda-navigator
* In the conda environment, run ``conda install ipykernel``
* To register the environment, run ``python -m ipykernel install --user --name omero-guide-cellprofiler``
* Select the notebook you wish to run and select the ``Kernel>Change kernel>Python [conda env:omero-guide-cellprofiler]`` or ``Kernel>Change kernel>omero-guide-cellprofiler``
* If Anaconda is not installed:
* In the environment, install ``jupyter`` e.g. ``pip install jupyter``
* Add the virtualenv as a jupyter kernel i.e. ``ipython kernel install --name "omero-guide-cellprofiler" --user``
* Open jupyter notebook i.e. ``jupyter notebook`` and select the ``omero-guide-cellprofiler`` kernel or ``[conda env:omero-guide-cellprofiler]`` according to what is available


An additional benefit of installing the requirements locally is that you
can then use the tools without needing to launch Jupyter itself.

See also [setup.rst](https://github.com/ome/omero-guide-cellprofiler/blob/master/docs/setup.rst)


This is a Sphinx based documentation.
Expand Down
29 changes: 14 additions & 15 deletions binder/environment.yml
Expand Up @@ -3,24 +3,23 @@ channels:
- anaconda
- bioconda
- conda-forge
- ome
dependencies:
- h5py
- matplotlib
- pandas
- zeroc-ice36-python
- h5py==3.7.0
- pandas==1.5.3
- pip
- python==3.8.*
- omero-py
- openjdk
- conda-forge::omero-py
- openjdk==11.0.13
- conda-forge::wxpython==4.1.0
- imageio
- inflect
- Jinja2
- mahotas
- scikit-image
- scikit-learn
- scipy
- six
- imageio==2.26.0
- inflect==5.3.0
- Jinja2==3.1.2
- mahotas==1.4.13
- scikit-image==0.20.0
- scikit-learn==1.2.2
- mysqlclient==1.4.6
- pip:
- ome-zarr
- numpy
- git+https://github.com/CellProfiler/CellProfiler.git@v4.1.3
- git+https://github.com/CellProfiler/CellProfiler.git@v4.2.4

0 comments on commit f3f5297

Please sign in to comment.