forked from mlcommons/GaNDLF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgandlf_verifyInstall
35 lines (26 loc) · 977 Bytes
/
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
#!usr/bin/env python
# -*- coding: utf-8 -*-
import os, argparse
from GANDLF.cli import copyrightMessage
# main function
if __name__ == "__main__":
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://mlcommons.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://mlcommons.github.io/GaNDLF/usage")