Skip to content

Commit

Permalink
Merge pull request #44 from MELDProject/dev_docker
Browse files Browse the repository at this point in the history
Dev docker
  • Loading branch information
kwagstyl authored Sep 19, 2024
2 parents 2fa1ee4 + 42efe40 commit abbe536
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
30 changes: 29 additions & 1 deletion docs/FAQs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# FAQs

Coming soon!
## Issues with native installation
TBC

## Issues with Docker installation
TBC

## Issues with Singularity/Apptainer installation

---
### Issue of space when with creating the SIF
```bash
INFO: Creating SIF file...
FATAL: While performing build: while creating squashfs: create command failed: exit status 1:
Write failed because No space left on device
```
It means there is not enough space where the default singularity/apptainer cache and temporary directories are located. Usually the default cache is located in `$HOME/.singularity/cache` and the default temporary directory `$HOME/.tmp`\
Solution:
- You can make space in the default `$HOME` directory
- You can change the singularity/apptainer cache and temporary directories for a folder where there is space:
```bash
export SINGULARITY_CACHEDIR=<path_folder_with_space>
export SINGULARITY_TMPDIR=<path_folder_with_space>
```
Or with apptainer
```bash
export APPTAINER_CACHEDIR=<path_folder_with_space>
export APPTAINER_TMPDIR=<path_folder_with_space>
```
---
11 changes: 7 additions & 4 deletions docs/install_singularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ Notes:
## Prerequisites

### Install Singularity
You will need to have Singularity installed. Most of the HPC will already have Singularity installed. You can check if singularity is installed on your computer by running:
You will need to have Singularity installed. Most of the HPC will already have Singularity installed or Apptainer. You can check if Singularity/Apptainer is installed on your computer by running:
```bash
singularity --version
```
If this command displays the singularity or apptainer version then it is already installed. If not, please follow the [guidelines](https://docs.sylabs.io/guides/3.0/user-guide/installation.html) to install singularity on your machine.
If this command displays the singularity or apptainer version already installed. If not, please follow the [guidelines](https://docs.sylabs.io/guides/3.0/user-guide/installation.html) to install singularity on your machine.


## Freesurfer licence
You will need to download a Freesurfer license.txt to enable Freesurfer/Fastsurfer to perform the segmentation. Please follow the [guidelines](https://surfer.nmr.mgh.harvard.edu/fswiki/License) to download the file and keep a record of the path where you saved it.

## Configuration
In order to run the singularity image, you'll need to Build the singularity image from the meld_graph docker image. This will create a singularity image called meld_graph.sif where you ran the command.
In order to run the singularity image, you'll need to build the singularity image from the meld_graph docker image. This will create a singularity image called meld_graph.sif where you ran the command.

Make sure you have 20GB of storage space available for the docker

Expand All @@ -41,7 +41,10 @@ Before being able to use the classifier on your data, data paths need to be set
export SINGULARITY_BINDPATH=/<path_to_meld_data_folder>:/data,<path_to_FS_license>/license.txt:/license.txt:ro
export SINGULARITYENV_FS_LICENSE=/license.txt
```

OR with Apptainer
```bash
export APPTAINER_BINDPATH=/<path_to_meld_data_folder>:/data,<path_to_FS_license>/license.txt:/license.txt:ro
export APPTAINERENV_FS_LICENSE=/license.txt
3. Run this command to download the data folder

```bash
Expand Down
2 changes: 1 addition & 1 deletion scripts/manage_results/plot_prediction_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def generate_prediction_report(
ax4 = fig3.add_subplot(gs3[1])
display4 = plotting.plot_anat(
t1_file, colorbar=False, cut_coords=coords,
draw_cross=False, radiological=True, annotate=False,
draw_cross=False, radiological=True, annotate=True,
figure=fig3, axes=ax4, vmax=vmax
)

Expand Down

0 comments on commit abbe536

Please sign in to comment.