mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-08 09:08:11 +08:00
separated installing and running Cellxgene Gateway
This commit is contained in:
@@ -12,22 +12,16 @@ Cellxgene Gateway allows you to use the Cellxgene Server provided by the Chan Zu
|
|||||||
$ python --version
|
$ python --version
|
||||||
```
|
```
|
||||||
|
|
||||||
1. It is also a good idea to always set up a venv.
|
1. It is also a good idea to set up a venv
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python -m venv .cellxgene-gateway
|
python -m venv .cellxgene-gateway
|
||||||
source .cellxgene-gateway/bin/activate
|
source .cellxgene-gateway/bin/activate # type `deactivate` to deactivate the venv
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Prepare a folder with .h5ad files, for example
|
## Install cellxgene-gateway
|
||||||
|
|
||||||
```bash
|
### Pip Install from Github
|
||||||
mkdir ../cellxgene_data
|
|
||||||
wget https://github.com/chanzuckerberg/cellxgene/raw/master/example-dataset/pbmc3k.h5ad -O ../cellxgene_data/pbmc3k.h5ad
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Pip Install from Github
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install git+https://github.com/Novartis/cellxgene-gateway
|
pip install git+https://github.com/Novartis/cellxgene-gateway
|
||||||
@@ -41,24 +35,40 @@ pip install git+https://github.com/Novartis/cellxgene-gateway
|
|||||||
|
|
||||||
### Developer Install
|
### Developer Install
|
||||||
|
|
||||||
If you want to develop the code, you will need to clone the repo. We assume your current working directory is the directory into which you've cloned this repository.
|
If you want to develop the code, you will need to clone the repo.
|
||||||
|
|
||||||
|
1. Clone the repo
|
||||||
|
|
||||||
1. Install requirements with
|
```bash
|
||||||
|
git clone https://github.com/Novartis/cellxgene-gateway.git
|
||||||
|
cd cellxgene-gateway
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Install requirements with
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Install the gateway in developer mode
|
3. Install the gateway in developer mode
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python setup.py develop
|
python setup.py develop
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For convenience, the code repo includes a `run.sh.example` shell script to run the gateway.
|
||||||
|
|
||||||
## Running cellxgene gateway
|
## Running cellxgene gateway
|
||||||
|
|
||||||
1. Set your environment variables correctly:
|
1. Prepare a folder with .h5ad files, for example
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir ../cellxgene_data
|
||||||
|
wget https://github.com/chanzuckerberg/cellxgene/raw/master/example-dataset/pbmc3k.h5ad -O ../cellxgene_data/pbmc3k.h5ad
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
2. Set your environment variables correctly:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export CELLXGENE_LOCATION=`which cellxgene`
|
export CELLXGENE_LOCATION=`which cellxgene`
|
||||||
@@ -68,14 +78,12 @@ export GATEWAY_PROTOCOL=http
|
|||||||
export GATEWAY_IP=127.0.0.1
|
export GATEWAY_IP=127.0.0.1
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Now, execute the cellxgene gateway:
|
3. Now, execute the cellxgene gateway:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cellxgene-gateway
|
cellxgene-gateway
|
||||||
```
|
```
|
||||||
|
|
||||||
For convenience, you can also change `run.sh.example` and execute it.
|
|
||||||
|
|
||||||
Here's what the environment variables mean:
|
Here's what the environment variables mean:
|
||||||
|
|
||||||
* `CELLXGENE_LOCATION` - the location of the cellxgene executable, e.g. `~/anaconda2/envs/cellxgene/bin/cellxgene`
|
* `CELLXGENE_LOCATION` - the location of the cellxgene executable, e.g. `~/anaconda2/envs/cellxgene/bin/cellxgene`
|
||||||
|
|||||||
Reference in New Issue
Block a user