forked from mlcommons/GaNDLF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgandlf_verifyInstall
41 lines (32 loc) · 1.2 KB
/
gandlf_verifyInstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!usr/bin/env python
# -*- coding: utf-8 -*-
import os, argparse
from datetime import date
# main function
if __name__ == "__main__":
copyrightMessage = (
"Contact: [email protected]\n\n"
+ "This program is NOT FDA/CE approved and NOT intended for clinical use.\nCopyright (c) "
+ str(date.today().year)
+ " University of Pennsylvania. All rights reserved."
)
parser = argparse.ArgumentParser(
prog="GANDLF_VerifyInstall",
formatter_class=argparse.RawTextHelpFormatter,
description="Verify GaNDLF installation.\n\n" + copyrightMessage,
)
try:
import GANDLF as gf
print("GaNDLF installed version:", gf.__version__)
except:
raise Exception(
"GaNDLF not properly installed, please see https://cbica.github.io/GaNDLF/setup"
)
# we always want to do submodule update to ensure any hash updates are ingested correctly
try:
os.system("git submodule update --init --recursive")
except:
print("Git was not found, please try again.")
os.system("pip install -e .")
args = parser.parse_args()
print("GaNDLF is ready. See https://cbica.github.io/GaNDLF/usage")