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
.envfile 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
.envfile. - 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 runningid -uon Linux systems, typically the first user on the system is1000or1001.- Windows users following the Docker Desktop install guide should have WSL 2 installed. You can open up command line, type
wsland then within WSL 2, you can enterid -uto 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
Getting started
Next →
Loading data with Airflow
On this page
- Installation
- Install locally
- GitHub repo
- Prerequisites
- Installation