Data catalog
Data catalogUse cases
Use casesExample queriesDocumentation
Getting startedInstallationLoading data with AirflowQuerying the databaseFinding tables in pgAdminHow SageRx worksInstallation
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
.env
with 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-init
and 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 up
NOTE: if you have anĀ M1 MacĀ export DOCKER_DEFAULT_PLATFORM=linux/amd64, and re-build your images
ā Previous
Next ā