-
Notifications
You must be signed in to change notification settings - Fork 590
/
Copy pathconfig.py
36 lines (25 loc) · 917 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
34
35
36
from jetson_containers import LSB_RELEASE
from packaging.version import Version
def jupyterlab(version='latest', requires=None, default=False):
pkg = package.copy()
pkg['name'] = f'jupyterlab:{version}'
if version != 'latest':
pkg['build_args'] = {
'JUPYTERLAB_VERSION_SPEC': f'=={version}' \
if version[0].isnumeric() else version
}
if requires:
pkg['requires'] = requires
myst = pkg.copy() # samples variant of the container
myst['name'] = myst['name'] + '-myst'
myst['dockerfile'] = 'Dockerfile.myst'
myst['depends'] = [pkg['name']]
if default:
pkg['alias'] = 'jupyterlab'
myst['alias'] = 'jupyterlab:myst'
return pkg, myst
default_latest = (Version(LSB_RELEASE) >= Version('22.04'))
package = [
jupyterlab('latest', default=default_latest),
jupyterlab('4.2.0', default=(not default_latest))
]