forked from alibaba/havenask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
120 lines (120 loc) · 3.28 KB
/
BUILD
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
load(
'@bazel_tools//tools/jdk:default_java_toolchain.bzl',
'default_java_toolchain', 'VANILLA_TOOLCHAIN_CONFIGURATION'
)
load('@bazel_skylib//rules:common_settings.bzl', 'bool_flag')
default_java_toolchain(
name='toolchain',
bootclasspath=[],
configuration=VANILLA_TOOLCHAIN_CONFIGURATION,
javabuilder=['@remote_java_tools_8//:VanillaJavaBuilder'],
jvm_opts=[],
visibility=['//visibility:public'],
java_runtime='@local_jdk//:jdk',
tools=[]
)
config_setting(name='arm_cpu', values={'cpu': 'aarch64'})
config_setting(name='clang_build', values={'define': 'compiler_type=clang++'})
config_setting(name='enable_rdma', values={'copt': '-DUSE_RDMA=1'})
config_setting(name='enable_solar', values={'copt': '-DACCL_USE_SOLAR=1'})
config_setting(
name='new_abi_mode',
define_values={'use_abi': '1'},
visibility=['//visibility:public']
)
config_setting(
name='old_abi_mode',
define_values={'use_abi': '0'},
visibility=['//visibility:public']
)
config_setting(
name='npu', values={'copt': '-DNPU=1'}, visibility=['//visibility:public']
)
config_setting(
name='fslib_enable_async',
define_values={'fslib_use_async': 'yes'},
visibility=['//visibility:public']
)
config_setting(
name='fslib_disable_async',
define_values={'fslib_use_async': 'no'},
visibility=['//visibility:public']
)
config_setting(
name='build_with_aicompiler',
define_values={'build_with_aicompiler': 'true'},
visibility=['//visibility:public']
)
config_setting(
name='build_with_ppu',
define_values={'build_with_ppu': 'true'},
visibility=['//visibility:public']
)
config_setting(
name='remote_exec',
define_values={'with_remote_exec': 'true'},
visibility=['//visibility:public']
)
config_setting(
name='aios_open_source',
define_values={'repo_mode': 'aios_open_source'},
visibility=['//visibility:public']
)
config_setting(
name='hack_get_set_env',
define_values={'hack_get_set_env': 'true'},
visibility=['//visibility:public']
)
config_setting(
name='glibc_2_17_compatible',
define_values={'glibc_2_17_compatible': 'true'},
visibility=['//visibility:public']
)
bool_flag(name='using_cuda', build_setting_default=False)
bool_flag(name='using_ppu', build_setting_default=False)
config_setting(
name='ppu_mode',
flag_values={
':using_cuda': 'True',
':using_ppu': 'True'
},
visibility=['//visibility:public']
)
config_setting(
name='gpu_mode',
flag_values={
':using_cuda': 'True',
':using_ppu': 'False'
},
visibility=['//visibility:public']
)
config_setting(
name='cpu_mode',
flag_values={
':using_cuda': 'False',
':using_ppu': 'False'
},
visibility=['//visibility:public']
)
config_setting(
name='disable_catalog_mongodb',
values={'define': 'disable_catalog_mongodb=true'},
visibility=['//visibility:public']
)
load(
'@io_bazel_rules_docker//container:container.bzl', 'container_layer',
'container_image'
)
container_layer(
name='python_symlink',
symlinks={
'/usr/bin/python': '/usr/local/bin/python',
'/usr/bin/python3': '/usr/local/bin/python'
}
)
container_image(
name='python3',
base='@python_container//image',
layers=[':python_symlink'],
visibility=['//visibility:public']
)