This guide outlines the steps to set up and run PatientX on a server, including configuring a new installation directory, creating a virtual environment, and running the required scripts.
Please reference tmux
explanation documentation for more details on why to use tmux
To create a new session, run
tmux new -s session_name
SSH into the HPC platform where you would like to run the PatientX code
Virtual environments are essential for managing dependencies and avoiding conflicts between different projects. This guide will walk you through creating and activating a virtual environment using venv
.
-
Make sure Python 3.10+ is installed on your system. You can check by running:
python --version
or
python3 --version
Virtual environments can help us manage dependecies across projects and ensure there are no conflicting dependencies. To create a virtual environment, use the following command:
python -m venv {ENV_NAME}
This will create a new directory called myenv containing the virtual environment.
To activate the new virtual environment
On Windows
{ENV_NAME}\Scripts\Activate
On macOS and Linux
source {ENV_NAME}/bin/activate
All dependecies and necessary packages for PatientX.AI
can be installed by running
pip install -e .
Install ollama by either going through their documentation or, if you do not have sudo access, by running
./script/install.sh
Run ollama server in the background by running
ollama serve &
Run the chosen model using
ollama run model-name &
To run the PatientX.AI code
- Update the config file with your desired parameters
- Run the pipeline using
python src/PatientX/run.py
- For help, run
python src/PatientX/run.py --help
For further assistance, consult the PatientX documentation or contact the development team.