Installation
A guide to installing SageRx locally.
Install locally
GitHub repo
Prerequisites
- Install Docker.
- Windows users will also install WSL 2 (a Linux subsystem that runs on Windows) as part of this process.
Installation
- Clone the repo.
git clone https://github.com/coderxio/sagerx.git- Add aÂ
.env file at the root of the repo (the /sagerx directory). - Windows users - use wsl terminal to do this step or find the /sagerx folder in File Explorer, right click within the open folder, click New â Text Document, and save it as
.envwith a file type of âAll Filesâ, not âTextâ.
cd sagerx
touch .env- Add ENV vars to theÂ
.env file. - Windows users - open your .env file in Notepad and add this text.
AIRFLOW_UID=<uid>
UMLS_API=<umls_api_key>AIRFLOW_UID=<uid> - replace<uid>with your own UID. UID can be found by runningÂid -u on Linux systems, typically the first user on the system isÂ1000 orÂ1001.- Windows users following the Docker Desktop install guide should have WSL 2 installed. You can open up command line, typeÂ
wsl and then within WSL 2, you can enterÂid -u to see your UID. UMLS_API=<umls_api_key> - (optional) if you want to use RxNorm, you need an API key from UMLS. Replace<umls_api_key>with your own API key.
- From within the /sagerx directory, runÂ
docker-compose up airflow-initand wait until exit code 0. - Windows users using Docker Desktop - run this and the following command in your Windows command prompt. Find the /sagerx folder in File Explorer, right click the /sagerx file folder, and click Open in Terminal.
Make sure docker is installed. See prerequisites section above.
docker-compose up airflow-init- RunÂ
docker-compose up.
docker-compose upNOTE: if you have an M1 Mac export DOCKER_DEFAULT_PLATFORM=linux/amd64, and re-build your images
â Previous
Next â
On this page
- Installation
- Install locally
- GitHub repo
- Prerequisites
- Installation