From abb5726a583c0ac3ae1b0f936d43cb9fb1a009fc Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Tue, 17 Dec 2024 15:12:35 +0100 Subject: [PATCH] update model python lib install instructions, add requriements/env files to web page for download --- .github/workflows/docs.yml | 1 + docs/models.md | 28 +++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1c377f9..78bf197 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,4 +25,5 @@ jobs: restore-keys: | mkdocs-material- - run: pip install mkdocs-material + - run: cp requirements.txt environment.yml docs/. - run: mkdocs gh-deploy --force diff --git a/docs/models.md b/docs/models.md index 045f135..64bc5ef 100644 --- a/docs/models.md +++ b/docs/models.md @@ -2,7 +2,29 @@ Example models and data are provided at [github.com/ZhaoWenzhao/QHCC](https://github.com/ZhaoWenzhao/QHCC). -In order to run the provided example scripts, you will need to use Python 3.8 or 3.9, and install the required Python libraries: +In order to run the provided example scripts, you will need to use Python 3.8 or 3.9, and install the required Python libraries. +You can do this with pip, by first [downloading requirements.txt](requirements.txt) and then running: + +=== "pip" + ```bash + pip install -r requirements.txt + ``` + +Or with conda or micromamba, by first [downloading environment.yml](environment.yml) and then running: + +=== "conda" + ```bash + conda env create -f environment.yml + conda activate QHCC + ``` + +=== "micromamba" + ```bash + micromamba env create -f environment.yml + micromamba activate QHCC + ``` + +Alternatively you can install the required Python libraries directly: === "pip" ```bash @@ -11,12 +33,12 @@ In order to run the provided example scripts, you will need to use Python 3.8 or === "conda" ```bash - conda env create -n QHCC2 jupyter numpy pandas pooch python radiomics::pyradiomics simpleitk scikit-learn xgboost -c conda-forge -c radiomics + conda env create -n QHCC jupyter numpy pandas pooch python radiomics::pyradiomics simpleitk scikit-learn xgboost -c conda-forge -c radiomics conda activate QHCC ``` === "micromamba" ```bash - micromamba env create -n QHCC2 jupyter numpy pandas pooch python radiomics::pyradiomics simpleitk scikit-learn xgboost -c conda-forge -c radiomics + micromamba env create -n QHCC jupyter numpy pandas pooch python radiomics::pyradiomics simpleitk scikit-learn xgboost -c conda-forge -c radiomics micromamba activate QHCC ```