-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
480105d
commit a33b379
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |