zenml-nightly 0.84.0.dev20250716__py3-none-any.whl → 0.84.0.dev20250717__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.
zenml/VERSION CHANGED
@@ -1 +1 @@
1
- 0.84.0.dev20250716
1
+ 0.84.0.dev20250717
@@ -35,6 +35,7 @@ from zenml.services.container.container_service_endpoint import (
35
35
  from zenml.services.service import BaseService, ServiceConfig
36
36
  from zenml.services.service_status import ServiceStatus
37
37
  from zenml.utils import docker_utils
38
+ from zenml.utils.docker_utils import check_docker
38
39
  from zenml.utils.io_utils import (
39
40
  create_dir_recursive_if_not_exists,
40
41
  get_global_config_directory,
@@ -217,6 +218,10 @@ class ContainerService(BaseService):
217
218
  providing additional information about that state (e.g. a
218
219
  description of the error, if one is encountered).
219
220
  """
221
+ # Check if Docker is available first
222
+ if not check_docker():
223
+ return (ServiceState.INACTIVE, "Docker daemon is not running")
224
+
220
225
  container: Optional[Container] = None
221
226
  try:
222
227
  container = self.docker_client.containers.get(self.container_id)
@@ -13,6 +13,7 @@
13
13
  # permissions and limitations under the License.
14
14
  """Zen Server docker deployer implementation."""
15
15
 
16
+ import os
16
17
  import shutil
17
18
  from typing import ClassVar, Optional, Tuple, Type, cast
18
19
  from uuid import uuid4
@@ -30,6 +31,7 @@ from zenml.services import (
30
31
  ServiceEndpointHealthMonitorConfig,
31
32
  ServiceEndpointProtocol,
32
33
  )
34
+ from zenml.utils.docker_utils import check_docker
33
35
  from zenml.zen_server.deploy.base_provider import BaseServerProvider
34
36
  from zenml.zen_server.deploy.deployment import LocalServerDeploymentConfig
35
37
  from zenml.zen_server.deploy.docker.docker_zen_server import (
@@ -253,6 +255,27 @@ class DockerServerProvider(BaseServerProvider):
253
255
  Raises:
254
256
  KeyError: If the server deployment is not found.
255
257
  """
258
+ # Check if Docker is available first
259
+ if not check_docker():
260
+ # Docker is not available, so we can't have a running Docker service
261
+ # Clean up the stale service configuration
262
+ service_config_path = DockerZenServer.config_path()
263
+ if os.path.exists(service_config_path):
264
+ logger.warning(
265
+ "Docker daemon is not running. Cleaning up stale Docker "
266
+ "ZenML server configuration at %s",
267
+ service_config_path,
268
+ )
269
+ try:
270
+ shutil.rmtree(service_config_path)
271
+ except Exception as e:
272
+ logger.debug(
273
+ "Failed to clean up stale Docker config: %s", e
274
+ )
275
+ raise KeyError(
276
+ "The docker ZenML server is not deployed (Docker daemon not running)."
277
+ )
278
+
256
279
  service = DockerZenServer.get_service()
257
280
  if service is None:
258
281
  raise KeyError("The docker ZenML server is not deployed.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: zenml-nightly
3
- Version: 0.84.0.dev20250716
3
+ Version: 0.84.0.dev20250717
4
4
  Summary: ZenML: Write production-ready ML code.
5
5
  License: Apache-2.0
6
6
  Keywords: machine learning,production,pipeline,mlops,devops
@@ -1,5 +1,5 @@
1
1
  zenml/README.md,sha256=827dekbOWAs1BpW7VF1a4d7EbwPbjwccX-2zdXBENZo,1777
2
- zenml/VERSION,sha256=F8_9D24LbtgOR97tC6TrmDMppCjJCZMjeQ6uOXn3qL8,19
2
+ zenml/VERSION,sha256=A0CvoFOl6yFyLNWnybeMxa5EBRneG-eNzsQuTod6YRE,19
3
3
  zenml/__init__.py,sha256=r7JUg2SVDf_dPhS7iU6vudKusEqK4ics7_jFMZhq0o4,2731
4
4
  zenml/actions/__init__.py,sha256=mrt6wPo73iKRxK754_NqsGyJ3buW7RnVeIGXr1xEw8Y,681
5
5
  zenml/actions/base_action.py,sha256=UcaHev6BTuLDwuswnyaPjdA8AgUqB5xPZ-lRtuvf2FU,25553
@@ -723,7 +723,7 @@ zenml/service_connectors/service_connector_registry.py,sha256=U5MdC9M_RfkHK56AoE
723
723
  zenml/service_connectors/service_connector_utils.py,sha256=vfJ-r_jeSkC2aGL3jbtelppsV8Iw40hBZ41USL0ZoU0,18015
724
724
  zenml/services/__init__.py,sha256=BhqBztNXLrqN-4FZr24WHP9ujP_M0plt6axQvakh1jQ,2784
725
725
  zenml/services/container/__init__.py,sha256=dFHcmlXgNXjUaCR18oGQJ19-I_6f3UeAUURHjqldjTs,668
726
- zenml/services/container/container_service.py,sha256=EJ8RM0llzCwKxVZj3Oyhu7HC0K8XNWP-VQhIutff-kw,18403
726
+ zenml/services/container/container_service.py,sha256=X4afKxnsJc1AT3qQHSDS4k60NoFv7dmiwvA7hvxAmng,18605
727
727
  zenml/services/container/container_service_endpoint.py,sha256=BbiWfXlibqIlizszOzOI3ksxL_gJlOIhzrL0IffD_98,4839
728
728
  zenml/services/container/entrypoint.py,sha256=flEuPHXZbeaiKUagapq2FKJxI8Ne3PKDKxezTjtihcs,3272
729
729
  zenml/services/local/__init__.py,sha256=0Ve3QQtblDD4aB9kvs8qbvN-osu-0l1uCYAY6-aeJHs,660
@@ -1024,7 +1024,7 @@ zenml/zen_server/deploy/daemon/daemon_zen_server.py,sha256=_nS3zfaSHIPY8iZxVIpjj
1024
1024
  zenml/zen_server/deploy/deployer.py,sha256=HrQoy4NwN_mZVZvxAcTI3gJzvS36Yo4z3fSx6gTbtUI,11584
1025
1025
  zenml/zen_server/deploy/deployment.py,sha256=v5wlNz4u7ZxQuex6Pq9Dsj3kj2NQN5a9Ee0IqiCWiL8,3259
1026
1026
  zenml/zen_server/deploy/docker/__init__.py,sha256=lNGI-Pl3PVMqR4BVajZXwe3moVNXPx5MHQk41CuHXg8,776
1027
- zenml/zen_server/deploy/docker/docker_provider.py,sha256=18pNpxvP8xqbxS_KxvYTEIuad8Ky5mVtk5TaKVVrzcY,8371
1027
+ zenml/zen_server/deploy/docker/docker_provider.py,sha256=FMAjYYY5p0UvpKmMWDjVOpizcA0cYeaHbS7DXt3xJrQ,9357
1028
1028
  zenml/zen_server/deploy/docker/docker_zen_server.py,sha256=vIsejmOZ5fcMzG_VOUbef_E1tSn8j3dMApmx-tmC4rA,7589
1029
1029
  zenml/zen_server/deploy/exceptions.py,sha256=tX0GNnLB_GMkeN7zGNlJRwtlrpZ5Slvyj_unVYVmGxk,1396
1030
1030
  zenml/zen_server/download_utils.py,sha256=g366TqytIWR4L4u9dd0jg-ouSWpDwdAh_-F2zryFzfo,4224
@@ -1347,8 +1347,8 @@ zenml/zen_stores/secrets_stores/sql_secrets_store.py,sha256=LPFW757WCJLP1S8vrvjs
1347
1347
  zenml/zen_stores/sql_zen_store.py,sha256=cXcKBBRKiwM2GtwHzmJb6tiN5NhGWo9n8SWnL1b4_WE,491150
1348
1348
  zenml/zen_stores/template_utils.py,sha256=iCXrXpqzVTY7roqop4Eh9J7DmLW6PQeILZexmw_l3b8,10074
1349
1349
  zenml/zen_stores/zen_store_interface.py,sha256=weiSULdI9AsbCE10a5TcwtybX-BJs9hKhjPJnTapWv4,93023
1350
- zenml_nightly-0.84.0.dev20250716.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1351
- zenml_nightly-0.84.0.dev20250716.dist-info/METADATA,sha256=YOOMtPxGCLFoN54cgmn_aBPj7pt83YHfVQ6VrtxoGkE,24296
1352
- zenml_nightly-0.84.0.dev20250716.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
1353
- zenml_nightly-0.84.0.dev20250716.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1354
- zenml_nightly-0.84.0.dev20250716.dist-info/RECORD,,
1350
+ zenml_nightly-0.84.0.dev20250717.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1351
+ zenml_nightly-0.84.0.dev20250717.dist-info/METADATA,sha256=3GBJp0tQ54bhy9cpvwPMVQsCj5EYskCdJLvKBIFjd9o,24296
1352
+ zenml_nightly-0.84.0.dev20250717.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
1353
+ zenml_nightly-0.84.0.dev20250717.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1354
+ zenml_nightly-0.84.0.dev20250717.dist-info/RECORD,,