improve install docs

This commit is contained in:
bkmartinjr
2019-11-09 12:49:22 -08:00
parent 9c8c28e1cb
commit d08506ae12
+52 -18
View File
@@ -3,38 +3,62 @@ title: Install
subtitle: Install subtitle: Install
layout: default layout: default
--- ---
# Installing cellxgene # Installing cellxgene
Cellxgene has two parts: Cellxgene has two parts:
* [`cellxgene`](launch) is the main explorer application, which takes an already-processed `h5ad` file as input. This is installed by default.
* [`cellxgene prepare`](prepare) provides auxiliary functionality for preparing your dataset. This is *not* installed by default.
## Requirements - [`cellxgene`](launch) is the main explorer application, which takes an already-processed `h5ad` file as input. This is installed by default.
You'll need **python 3.6+** and **Google Chrome**. - [`cellxgene prepare`](prepare) provides auxiliary functionality for preparing your dataset. This is _not_ installed by default.
## Requirements
You'll need **python 3.6+** and an up-to-date version of **Google Chrome**.
The web UI is tested on OSX and Windows using Chrome, and the python CLI is tested on OSX and Ubuntu (via WSL/Windows). The web UI is tested on OSX and Windows using Chrome, and the python CLI is tested on OSX and Ubuntu (via WSL/Windows).
It should work on other platforms, but if you run into trouble let us know. It should work on other platforms, but if you run into trouble let us know.
## Basic install [Python.org](https://www.python.org/downloads/) has help on installing a recent
To install `cellxgene` alone, run: version of Python, including the pip package manager. Chrome is available at
`pip install cellxgene` [Google.com/chrome](https://google.com/chrome).
To install `cellxgene` and the optional `cellxgene prepare`, run: ## Basic install using pip
`pip install cellxgene[prepare]`
To install the `cellxgene` explorer alone, run:
```
pip install cellxgene
```
To install `cellxgene` and the optional `cellxgene prepare`, run:
```
pip install cellxgene[prepare]
```
_Note: if the aforementioned optional `prepare` package installation fails, you can also install these packages directly:_
_Note: if the aforementioned optional `prepare` package installation fails, you can also install these packages directly:_
``` ```
pip install scanpy>=1.3.7 python-igraph louvain>=0.6 pip install scanpy>=1.3.7 python-igraph louvain>=0.6
``` ```
If you already have `cellxgene` installed, you can update to the most recent version by running:
```
pip install cellxgene --upgrade
```
## Using a conda environment ## Using a conda environment
To install `cellxgene` alone, run:
To install `cellxgene` alone, run:
``` ```
conda create --yes -n cellxgene python=3.7 conda create --yes -n cellxgene python=3.7
conda activate cellxgene conda activate cellxgene
pip install cellxgene pip install cellxgene
``` ```
To install `cellxgene` and the optional `cellxgene prepare`, run: To install `cellxgene` and the optional `cellxgene prepare`, run:
``` ```
conda create --yes -n cellxgene python=3.7 conda create --yes -n cellxgene python=3.7
conda activate cellxgene conda activate cellxgene
@@ -42,7 +66,9 @@ pip install cellxgene[prepare]
``` ```
## Using a virtual environment ## Using a virtual environment
To install `cellxgene` alone, run:
To install `cellxgene` alone, run:
``` ```
ENV_NAME=cellxgene ENV_NAME=cellxgene
python3.7 -m venv ${ENV_NAME} python3.7 -m venv ${ENV_NAME}
@@ -50,7 +76,8 @@ source ${ENV_NAME}/bin/activate
pip install cellxgene pip install cellxgene
``` ```
To install `cellxgene` and `cellxgene prepare`, run: To install `cellxgene` and `cellxgene prepare`, run:
``` ```
ENV_NAME=cellxgene ENV_NAME=cellxgene
python3.7 -m venv ${ENV_NAME} python3.7 -m venv ${ENV_NAME}
@@ -59,10 +86,17 @@ pip install cellxgene[prepare]
``` ```
## Using docker ## Using docker
Build the image
`docker build . -t cellxgene`
Run the container and mount data Build the image
`docker run -v "$PWD/example-dataset/:/data/" -p 5005:5005 cellxgene launch --host 0.0.0.0 data/pbmc3k.h5ad`
```
docker build . -t cellxgene
```
Run the container and mount data (change data location, `--port` and `--host` parameters as needed)
```
docker run -v "$PWD/example-dataset/:/data/" -p 5005:5005 cellxgene launch --host 0.0.0.0 data/pbmc3k.h5ad
```
You will need to use `--host 0.0.0.0` to have the container listen to incoming requests from the browser You will need to use `--host 0.0.0.0` to have the container listen to incoming requests from the browser