Skip to content

Commit

Permalink
Merge pull request #48 from MELDProject/dev_docker
Browse files Browse the repository at this point in the history
Dev docker
  • Loading branch information
kwagstyl authored Sep 24, 2024
2 parents 06d3bd2 + 52028a3 commit 26f03a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docs/install_singularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ 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
```

3. Run this command to download the data folder
```bash
singularity exec meld_graph.sif /bin/bash -c "cd /app && python scripts/new_patient_pipeline/prepare_classifier.py "
```
Expand Down
8 changes: 3 additions & 5 deletions scripts/env_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ def setup():
if sys.platform == "darwin":
if os.path.exists("/Applications/freesurfer/7.2.0"):
os.environ["FREESURFER_HOME"] = "/Applications/freesurfer/7.2.0"

# check if FREESURFER_HOME is set up correctly
freesurfercheck = subprocess.run(['/bin/bash', '-c', "which freeview"], capture_output=True)
# Load freesurfer environment variables. This is equivalent to running the source command in a shell then running python, but for ease of use we set it up in process.

freesurfercheck = subprocess.run(['/bin/bash', '-c', "type freeview"], capture_output=True)
if freesurfercheck.returncode > 0:
# A command that sources freesurfer
source = 'source /Applications/freesurfer/7.2.0/SetUpFreeSurfer.sh'
Expand All @@ -25,7 +23,7 @@ def setup():
if os.path.exists(f"{MELD_DATA_PATH}/license.txt"):
print("setting license" + f"{MELD_DATA_PATH}/license.txt")
os.environ["FS_LICENSE"] = f"{MELD_DATA_PATH}/license.txt"
elif os.path.exists(f"{os.getcwd()}/license.txt"):
if os.path.exists(f"{os.getcwd()}/license.txt"):
print("setting license" + f"{os.getcwd()}/license.txt")
os.environ["FS_LICENSE"] = f"{os.getcwd()}/license.txt"
else:
Expand Down

0 comments on commit 26f03a9

Please sign in to comment.