-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
58 lines (47 loc) · 1.61 KB
/
Copy pathsetup.py
File metadata and controls
58 lines (47 loc) · 1.61 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python3
"""
Setup script for SLURM Job Analytics Project
"""
import subprocess
import sys
import os
def install_requirements():
"""Install requirements with specific versions to avoid conflicts"""
requirements = [
"duckdb>=0.8.0",
"pandas>=1.5.0",
"matplotlib>=3.5.0",
"seaborn>=0.11.0",
"streamlit>=1.28.0",
"fire==0.4.0", # Pin to avoid Inspector.__init__ issue
"numpy>=1.21.0"
]
print("Installing requirements...")
for req in requirements:
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", req])
print(f"✅ Installed {req}")
except subprocess.CalledProcessError:
print(f"❌ Failed to install {req}")
return False
return True
def setup_paths():
"""Add src to Python path for imports"""
src_path = os.path.join(os.path.dirname(__file__), "src")
if src_path not in sys.path:
sys.path.insert(0, src_path)
def main():
"""Main setup function"""
print("🚀 Setting up SLURM Job Analytics Project...")
if not install_requirements():
print("❌ Setup failed during requirements installation")
return 1
setup_paths()
print("✅ Setup complete!")
print("\n📖 Next steps:")
print("1. Run the dashboard: cd src/dashboard && streamlit run app.py")
print("2. Try command line tools: cd src/analytics && python gpu_metrics.py waittime")
print("3. Generate emails: cd src/outreach && python email_outreach.py")
return 0
if __name__ == "__main__":
sys.exit(main())