-
Notifications
You must be signed in to change notification settings - Fork 521
/
Copy pathconfig.py
31 lines (22 loc) · 859 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
from jetson_containers import CUDA_ARCHITECTURES
def ctranslate2(version, requires=None, default=False):
ct = package.copy()
ct['name'] = f'ctranslate2:{version}'
ct['build_args'] = {
'CTRANSLATE_VERSION': version,
'CTRANSLATE_BRANCH': 'v' + version if version.replace('.','').isnumeric() else version
}
if requires:
ct['requires'] = requires
builder = ct.copy()
builder['name'] = builder['name'] + '-builder'
builder['build_args'] = {**builder['build_args'], 'FORCE_BUILD': 'on'}
if default:
ct['alias'] = 'ctranslate2'
builder['alias'] = 'ctranslate2:builder'
return ct, builder
package = [
ctranslate2('master'),
ctranslate2('4.2.0', requires='<=cu122', default=True),
ctranslate2('4.4.0', requires='>=cu124', default=True),
]