naas-abi-core 1.0.8__py3-none-any.whl → 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- naas_abi_core/cli/deploy.py +9 -7
- naas_abi_core/utils/Logger.py +1 -1
- {naas_abi_core-1.0.8.dist-info → naas_abi_core-1.1.1.dist-info}/METADATA +1 -1
- {naas_abi_core-1.0.8.dist-info → naas_abi_core-1.1.1.dist-info}/RECORD +6 -6
- {naas_abi_core-1.0.8.dist-info → naas_abi_core-1.1.1.dist-info}/WHEEL +0 -0
- {naas_abi_core-1.0.8.dist-info → naas_abi_core-1.1.1.dist-info}/entry_points.txt +0 -0
naas_abi_core/cli/deploy.py
CHANGED
|
@@ -115,7 +115,10 @@ class NaasDeployer:
|
|
|
115
115
|
f"docker build -t {image_name} . --platform linux/amd64", shell=True
|
|
116
116
|
)
|
|
117
117
|
|
|
118
|
-
def
|
|
118
|
+
def env_list_to_dict(self, env: list[str]) -> dict:
|
|
119
|
+
return {env_var.split("=", 1)[0]: env_var.split("=", 1)[1] for env_var in env}
|
|
120
|
+
|
|
121
|
+
def deploy(self, env: list[str]):
|
|
119
122
|
registry = self.naas_api_client.create_registry(
|
|
120
123
|
self.configuration.deploy.space_name
|
|
121
124
|
)
|
|
@@ -145,6 +148,7 @@ class NaasDeployer:
|
|
|
145
148
|
|
|
146
149
|
image_name_with_sha = f"{image_name.replace(':' + uid, '')}@{image_sha}"
|
|
147
150
|
|
|
151
|
+
|
|
148
152
|
self.naas_api_client.create_space(
|
|
149
153
|
Space(
|
|
150
154
|
name=self.configuration.deploy.space_name,
|
|
@@ -155,7 +159,7 @@ class NaasDeployer:
|
|
|
155
159
|
port=9879,
|
|
156
160
|
cpu="1",
|
|
157
161
|
memory="1Gi",
|
|
158
|
-
env={
|
|
162
|
+
env=self.env_list_to_dict(env) | {
|
|
159
163
|
"NAAS_API_KEY": self.configuration.deploy.naas_api_key,
|
|
160
164
|
"ENV": "prod",
|
|
161
165
|
},
|
|
@@ -174,15 +178,13 @@ class NaasDeployer:
|
|
|
174
178
|
- Image: {image_name_with_sha}
|
|
175
179
|
- URL: https://{self.configuration.deploy.space_name}.default.space.naas.ai
|
|
176
180
|
|
|
177
|
-
```json
|
|
178
|
-
{json.dumps(space, indent=4)}
|
|
179
|
-
```
|
|
180
181
|
""")
|
|
181
182
|
)
|
|
182
183
|
|
|
183
184
|
|
|
184
185
|
@deploy.command("naas")
|
|
185
|
-
|
|
186
|
+
@click.option("-e", "--env", multiple=True, help="Environment variables to set (e.g. -e FOO=BAR -e BAZ=QUX)")
|
|
187
|
+
def naas(env: list[str]):
|
|
186
188
|
configuration: EngineConfiguration = EngineConfiguration.load_configuration()
|
|
187
189
|
|
|
188
190
|
if configuration.deploy is None:
|
|
@@ -191,4 +193,4 @@ def naas():
|
|
|
191
193
|
)
|
|
192
194
|
|
|
193
195
|
deployer = NaasDeployer(configuration)
|
|
194
|
-
deployer.deploy()
|
|
196
|
+
deployer.deploy(env)
|
naas_abi_core/utils/Logger.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: naas-abi-core
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Abi framework allowing you to build your AI system.
|
|
5
5
|
Author-email: Maxime Jublou <maxime@naas.ai>, Florent Ravenel <florent@naas.ai>, Jeremy Ravenel <jeremy@naas.ai>
|
|
6
6
|
Requires-Python: <4,>=3.10
|
|
@@ -11,7 +11,7 @@ naas_abi_core/cli/__init__.py,sha256=P89Ihofvv_pQf2wsfYL-PjLJMl6KRj3fNNIZDB77Qy0
|
|
|
11
11
|
naas_abi_core/cli/agent.py,sha256=fMdbC7HsrOfZSf5zVRHWSmyrejI5mUdRlAT5v5YHXzk,658
|
|
12
12
|
naas_abi_core/cli/chat.py,sha256=3t_TJ7vqCNs0MIIXOtlSke3nzy4rMSEJtB3P6pKItMo,856
|
|
13
13
|
naas_abi_core/cli/config.py,sha256=CcdDX6HKCP32NjRhbVsCOwLUC9LmaqTm2sv8W5rOt00,1484
|
|
14
|
-
naas_abi_core/cli/deploy.py,sha256=
|
|
14
|
+
naas_abi_core/cli/deploy.py,sha256=Vmjsf44qYvDkWYGFJHhPaoKipt56FEZcfv4Mswys574,5976
|
|
15
15
|
naas_abi_core/cli/init.py,sha256=Pcy2-hy-FvpXf3UOKMP6agWyFrCl9z-KP5ktEWltPy0,220
|
|
16
16
|
naas_abi_core/cli/module.py,sha256=TBl-SpeGUcy1Rrp40Irbt34yQS00xJcNje-OijNE4Hk,717
|
|
17
17
|
naas_abi_core/cli/new.py,sha256=aFhKbTHwqYkPdzrd7r8i_h9dfzXNjI03t8qVeqME8w8,262
|
|
@@ -106,7 +106,7 @@ naas_abi_core/utils/Expose.py,sha256=ycxiz2tOXkRco_fiNM281e85RWHWi2xUT82PEE_Hdjk
|
|
|
106
106
|
naas_abi_core/utils/Graph.py,sha256=FoBuiTrcLw4dzhROnd7JHp-LMxMuwJISFbtdrwpoM24,6288
|
|
107
107
|
naas_abi_core/utils/JSON.py,sha256=onIs-E3GWz4fvRuWBQpyb9qRNXCOJPf9x1yV1-jDlqU,1687
|
|
108
108
|
naas_abi_core/utils/LazyLoader.py,sha256=rWrnFVuKCK1WrtNgeiegT_i7AkxGy9qK2hfhsXV4dCY,1120
|
|
109
|
-
naas_abi_core/utils/Logger.py,sha256=
|
|
109
|
+
naas_abi_core/utils/Logger.py,sha256=WzsLDu52Nko3LHuZFZ5B_etcL4ZhLsx5IN6TxSV6FGY,201
|
|
110
110
|
naas_abi_core/utils/OntologyReasoner.py,sha256=OgDgiymd7HuDI28XZfcS2-9QeR7_jY9o9LWBQu2AU7k,4591
|
|
111
111
|
naas_abi_core/utils/OntologyYaml.disabled.py,sha256=y5dYzD6w3yByQ4I-T6km6T2J0t-sTNy6iNm8ocpffyA,25246
|
|
112
112
|
naas_abi_core/utils/SPARQL.py,sha256=Yjk2INdNIUuv8P26-ToqNik5odyUroybzWvijMsfcns,9313
|
|
@@ -123,7 +123,7 @@ naas_abi_core/utils/onto2py/tests/ttl2py_test.py,sha256=5OZqSxPffjJYiX9T4rT1mV0P
|
|
|
123
123
|
naas_abi_core/workflow/__init__.py,sha256=hZD58mCB1PApxITqftP_xgjxL7NeLvOfI-rJENg1ENs,250
|
|
124
124
|
naas_abi_core/workflow/workflow.py,sha256=ZufSS073JztVl0OQRTqNyK7FepFvv7gXlc4j5FAEZCI,1216
|
|
125
125
|
assets/favicon.ico,sha256=nWk8wrHZiJV3DeuWrP2MqilXxCuoNWKGtMZfYmEVQLw,666
|
|
126
|
-
naas_abi_core-1.
|
|
127
|
-
naas_abi_core-1.
|
|
128
|
-
naas_abi_core-1.
|
|
129
|
-
naas_abi_core-1.
|
|
126
|
+
naas_abi_core-1.1.1.dist-info/METADATA,sha256=N_uONUiksIeNE7DwwW1hWeFUTNDYehPFo2d9LsEHtuE,3897
|
|
127
|
+
naas_abi_core-1.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
128
|
+
naas_abi_core-1.1.1.dist-info/entry_points.txt,sha256=q68PvlGw_rozZ0nl6mUg6l1l2IhxaTOKlf5K9goRDu0,99
|
|
129
|
+
naas_abi_core-1.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|