Skip to content

Commit

Permalink
update deployment info
Browse files Browse the repository at this point in the history
  • Loading branch information
codewarrior2000 authored Oct 19, 2021
1 parent 480105d commit a33b379
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions transformers/drugcentral/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## How to deploy DrugCentral transformer

### Package transformer

Package transformer itself
```
cd transformers/drugcentral/python-flask-server
python setup.py bdist_wheel
```
Package transformer base class
```
cd util/python/
python setup.py bdist_wheel
```

### Copy files to server

copy `transformers/drugcentral/python-flask-server/dist/drug_central_transformer-2.3.2-py3-none-any.whl` to the target folder

copy `util/python/transformers-2.0/dist/base_transformer-2.0.0-py3-none-any.whl` to the target folder

copy `transformers/drugcentral/python-flask-server/info` folder to the target folder

copy `util/python/transformers-2.0/config/BiolinkClassMap.txt` to `data` subfolder of the target folder

copy `util/python/transformers-2.0/config/prefixMap.json` to `data` subfolder of the target folder

download DrugCentral.sqlite from `https://translator.broadinstitute.org/db/DrugCentral.sqlite` and save to `data` subfolder of the target folder


### Install transformer on server

```
python3 -m venv venv
source venv/bin/activate.csh
pip install -I drug_central_transformer-2.3.2-py3-none-any.whl
pip install -I base_transformer-2.0.0-py3-none-any.whl
pip install gunicorn
pip install "connexion[swagger-ui]"
deactivate
```

### Launch transformer

```
mkdir logs
source venv/bin/activate.csh
nohup gunicorn -w 2 -b 0.0.0.0:<port#> openapi_server.__main__:app --timeout 300 >& logs/openapi_server.log &
deactivate
```

0 comments on commit a33b379

Please sign in to comment.