forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
33 lines (25 loc) · 959 Bytes
/
config.py
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
import requests
def get_latest_stable_version(fallback="1.2.0") -> str:
try:
response = requests.get('https://raw.githubusercontent.com/rhasspy/wyoming-satellite/master/wyoming_satellite/VERSION')
if response.status_code == 200:
return response.text.strip()
else:
print("Failed to fetch version information. Status code:", response.status_code)
return fallback
except Exception as e:
print("An error occurred:", e)
return fallback
def create_package(version, default=False) -> list:
pkg = package.copy()
wanted_version = get_latest_stable_version() if version == 'latest' else version
pkg['name'] = f'wyoming-assist-microphone:{version}'
pkg['build_args'] = {
'SATELLITE_VERSION': wanted_version,
}
if default:
pkg['alias'] = 'wyoming-assist-microphone'
return pkg
package = [
create_package("latest", default=True),
]