-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,45 @@ | ||
# Install dependencies | ||
Write-Output "Installing Dependencies..." | ||
npm install | ||
# Check and install Python if not installed | ||
function Install-Python { | ||
if (-not (Get-Command python3 -ErrorAction SilentlyContinue)) { | ||
Write-Output "Python3 could not be found. Installing Python3..." | ||
Invoke-WebRequest -Uri "https://www.python.org/ftp/python/3.9.5/python-3.9.5-amd64.exe" -OutFile "python-installer.exe" | ||
Start-Process -FilePath "python-installer.exe" -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1" -Wait | ||
Remove-Item -Path "python-installer.exe" -Force | ||
|
||
# Start the app using npm start | ||
Write-Output "Starting the app..." | ||
npm start | ||
# Verify installation | ||
if (-not (Get-Command python3 -ErrorAction SilentlyContinue)) { | ||
Write-Output "Python3 installation failed. Please install Python3 manually." | ||
exit 1 | ||
} | ||
} else { | ||
Write-Output "Python3 is already installed." | ||
} | ||
} | ||
|
||
# Install Python dependencies | ||
function Install-PythonDependencies { | ||
Write-Output "Installing Python dependencies..." | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r requirements.txt | ||
} | ||
|
||
# Install npm dependencies | ||
function Install-NpmDependencies { | ||
Write-Output "Installing npm dependencies..." | ||
npm install | ||
} | ||
|
||
# Start the servers | ||
function Start-Servers { | ||
Write-Output "Starting the server with npm start..." | ||
Start-Process -NoNewWindow -FilePath "npm" -ArgumentList "start" | ||
|
||
Write-Output "Starting the FastAPI server with uvicorn..." | ||
Start-Process -NoNewWindow -FilePath "python" -ArgumentList "-m uvicorn server:app --host 0.0.0.0 --port 8000 --reload" | ||
} | ||
|
||
# Execute functions | ||
Install-Python | ||
Install-PythonDependencies | ||
Install-NpmDependencies | ||
Start-Servers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"timestamp": "2024-05-14T01:54:59.389964", "eva": {"eva": {"started": true, "paused": false, "completed": false, "total_time": 769, "uia": {"started": false, "completed": false, "time": 0}, "dcu": {"started": false, "completed": false, "time": 0}, "rover": {"started": false, "completed": false, "time": 0}, "spec": {"started": false, "completed": false, "time": 0}}}, "telemetry": {"telemetry": {"eva_time": 769, "eva1": {"batt_time_left": 5077.148926, "oxy_pri_storage": 23.755802, "oxy_sec_storage": 8.369159, "oxy_pri_pressure": 0.0, "oxy_sec_pressure": 251.074402, "oxy_time_left": 3469, "heart_rate": 90.0, "oxy_consumption": 0.103292, "co2_production": 0.097232, "suit_pressure_oxy": 3.072312, "suit_pressure_co2": 0.056858, "suit_pressure_other": 11.5542, "suit_pressure_total": 14.683371, "fan_pri_rpm": 0.0, "fan_sec_rpm": 30001.0, "helmet_pressure_co2": 0.101604, "scrubber_a_co2_storage": 0.0, "scrubber_b_co2_storage": 100.095428, "temperature": 72.118309, "coolant_ml": 20.508068, "coolant_gas_pressure": 0.0, "coolant_liquid_pressure": 113.769783}, "eva2": {"batt_time_left": 3384.893799, "oxy_pri_storage": 24.231962, "oxy_sec_storage": 12.298765, "oxy_pri_pressure": 0.002643, "oxy_sec_pressure": 368.961212, "oxy_time_left": 3945, "heart_rate": 90.0, "oxy_consumption": 0.0974, "co2_production": 0.091963, "suit_pressure_oxy": 3.072322, "suit_pressure_cO2": 0.056769, "suit_pressure_other": 11.5542, "suit_pressure_total": 14.68329, "fan_pri_rpm": 0.0, "fan_sec_rpm": 30001.0, "helmet_pressure_co2": 0.10206, "scrubber_a_co2_storage": 0.0, "scrubber_b_co2_storage": 100.08062, "temperature": 80.719376, "coolant_ml": 22.034748, "coolant_gas_pressure": 9.842337, "coolant_liquid_pressure": 126.975426}}}} | ||
{"timestamp": "2024-05-14T01:57:13.301608", "eva": {"eva": {"started": true, "paused": false, "completed": false, "total_time": 903, "uia": {"started": false, "completed": false, "time": 0}, "dcu": {"started": false, "completed": false, "time": 0}, "rover": {"started": false, "completed": false, "time": 0}, "spec": {"started": false, "completed": false, "time": 0}}}, "telemetry": {"telemetry": {"eva_time": 903, "eva1": {"batt_time_left": 5077.148926, "oxy_pri_storage": 23.755802, "oxy_sec_storage": 7.128418, "oxy_pri_pressure": 0.0, "oxy_sec_pressure": 213.852325, "oxy_time_left": 3335, "heart_rate": 90.0, "oxy_consumption": 0.095405, "co2_production": 0.099593, "suit_pressure_oxy": 3.072351, "suit_pressure_co2": 0.165967, "suit_pressure_other": 11.5542, "suit_pressure_total": 14.792519, "fan_pri_rpm": 0.0, "fan_sec_rpm": 30001.0, "helmet_pressure_co2": 0.194281, "scrubber_a_co2_storage": 0.0, "scrubber_b_co2_storage": 100.095428, "temperature": 73.808022, "coolant_ml": 20.508068, "coolant_gas_pressure": 0.0, "coolant_liquid_pressure": 116.435379}, "eva2": {"batt_time_left": 3384.893799, "oxy_pri_storage": 24.231962, "oxy_sec_storage": 11.058024, "oxy_pri_pressure": 0.001433, "oxy_sec_pressure": 331.740204, "oxy_time_left": 3811, "heart_rate": 90.0, "oxy_consumption": 0.100635, "co2_production": 0.101986, "suit_pressure_oxy": 3.072343, "suit_pressure_cO2": 0.165773, "suit_pressure_other": 11.5542, "suit_pressure_total": 14.792315, "fan_pri_rpm": 0.0, "fan_sec_rpm": 30001.0, "helmet_pressure_co2": 0.194499, "scrubber_a_co2_storage": 0.0, "scrubber_b_co2_storage": 100.08062, "temperature": 74.974472, "coolant_ml": 22.034748, "coolant_gas_pressure": 0.0, "coolant_liquid_pressure": 127.080276}}}} |