From bd25dd1d6d483093b0a07ffb00df6706ccc828f1 Mon Sep 17 00:00:00 2001 From: hnguyent Date: Mon, 30 Sep 2024 01:24:55 +0200 Subject: [PATCH] [UPDATE] instruction for using containers for v0.0.6 --- README.md | 14 +++++--------- containers/README.md | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 499dc3d..97a66f0 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Choose a command: -To assure that you can run the docker with GPUs if available, see the instruction here: https://github.com/hnguyentt/MouseCHD/tree/master/containers#docker +To assure that you can run the docker with GPUs if available, see [Running docker with GPU](https://github.com/hnguyentt/MouseCHD/tree/master/containers#running-docker-with-gpu) section. ### Apptainer In case you run the package on HPC on which you don't have superuser permission, you can use Apptainer instead of docker. @@ -42,7 +42,7 @@ In case you run the package on HPC on which you don't have superuser permission, ```bash wget https://zenodo.org/records/13855119/files/mousechd.sif ``` -* On HPC, the internet connection may not be not available on running node, you should download models in advance. See the downloading instruction [here](https://github.com/hnguyentt/MouseCHD/tree/master/containers#apptainer) +* On HPC, the internet connection may not be not available on running node, you should download models in advance. See the downloading instruction [Downloading models in advance on HPC](https://github.com/hnguyentt/MouseCHD/tree/master/containers#downloading-models-in-advance-on-hpc) * Test if container run correctly: `apptainer exec --nv mousechd -h`
@@ -77,12 +77,7 @@ It is recommended that your data are structured in the following way: ...... ``` -In case you use container, append these prefixes to the following commands: -* Docker: `sudo docker run --gpus all -v /path/on/host:/path/in/container mousechd` - * `--gpus all`: container can see and use all gpus available on host - * `-v /path/on/host:/path/in/container`: mount host data to container. For example, I mount my home folder to container home folder: `-v /home/hnguyent:/homme/hnguyent` -* Apptainer: `apptainer exec --nv ` - * `--nv`: container can see and use available gpus. +In case you use container, see [Running `mousechd` with docker](https://github.com/hnguyentt/MouseCHD/tree/master/containers#running-mousechd-with-docker) and [Running `mousechd` with Apptainer](https://github.com/hnguyentt/MouseCHD/tree/master/containers#running-mousechd-with-apptainer) for more details. ### (1) Preprocessing @@ -105,7 +100,8 @@ mousechd preprocess \ ```bash mousechd segment -indir "DATA/processed/images" -outdir "OUTPUTS/HeartSeg" ``` -If your computer crashes when running this, you can decrease the number of threads for preprocessing (`default: 6`)and saving NIFTI files +If your computer crashes when running this, you can decrease the number of threads for preprocessing (`-num_threads_preprocessing`, default: 6) and saving NIFTI files (`-num_thread_nifti_save`, default: 2) + ### (3) CHD detection ```bash mousechd test_clf \ diff --git a/containers/README.md b/containers/README.md index c8dfa2d..5696872 100644 --- a/containers/README.md +++ b/containers/README.md @@ -38,7 +38,7 @@ mkdir -p ~/.MouseCHD/Classifier/"$ver" && cd ~/.MouseCHD/Classifier/"$ver" && wg mkdir -p ~/.MouseCHD/HeartSeg/"$ver" && cd ~/.MouseCHD/HeartSeg/"$ver" && wget https://zenodo.org/records/"$ver"/files/HeartSeg.zip && unzip HeartSeg.zip && rm HeartSeg.zip && cd ~ ``` -### Run `mousechd` with Apptainer +### Running `mousechd` with Apptainer * Download Apptainer: `wget https://zenodo.org/records/13855119/files/mousechd.sif` * Download model in advance (only on HPC) like the [instruction above](). * Append this prefix before every command in the [How to use](https://github.com/hnguyentt/MouseCHD?tab=readme-ov-file#how-to-use): `apptainer exec [-B /path/to/directory/on/host] --nv `: