xpk 0.7.0__tar.gz → 0.7.2__tar.gz

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.
Files changed (97) hide show
  1. {xpk-0.7.0/src/xpk.egg-info → xpk-0.7.2}/PKG-INFO +5 -2
  2. {xpk-0.7.0 → xpk-0.7.2}/README.md +2 -0
  3. {xpk-0.7.0 → xpk-0.7.2}/pyproject.toml +1 -1
  4. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/storage.py +24 -11
  5. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/config.py +1 -1
  6. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/pathways.py +14 -14
  7. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/storage.py +10 -0
  8. {xpk-0.7.0 → xpk-0.7.2/src/xpk.egg-info}/PKG-INFO +5 -2
  9. {xpk-0.7.0 → xpk-0.7.2}/LICENSE +0 -0
  10. {xpk-0.7.0 → xpk-0.7.2}/setup.cfg +0 -0
  11. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/__init__.py +0 -0
  12. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/api/__init__.py +0 -0
  13. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/api/storage_crd.yaml +0 -0
  14. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/__init__.py +0 -0
  15. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/batch.py +0 -0
  16. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/cluster.py +0 -0
  17. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/cluster_gcluster.py +0 -0
  18. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/common.py +0 -0
  19. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/config.py +0 -0
  20. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/info.py +0 -0
  21. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/inspector.py +0 -0
  22. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/job.py +0 -0
  23. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/kind.py +0 -0
  24. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/kjob_common.py +0 -0
  25. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/run.py +0 -0
  26. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/shell.py +0 -0
  27. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/version.py +0 -0
  28. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/commands/workload.py +0 -0
  29. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/__init__.py +0 -0
  30. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/blueprint/__init__.py +0 -0
  31. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/blueprint/blueprint_definitions.py +0 -0
  32. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/blueprint/blueprint_generator.py +0 -0
  33. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/capacity.py +0 -0
  34. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/cluster.py +0 -0
  35. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/cluster_private.py +0 -0
  36. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/commands.py +0 -0
  37. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/docker_container.py +0 -0
  38. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/docker_image.py +0 -0
  39. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/docker_manager.py +0 -0
  40. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/docker_resources.py +0 -0
  41. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/filestore.py +0 -0
  42. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/gcloud_context.py +0 -0
  43. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/gcluster_manager.py +0 -0
  44. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/gcsfuse.py +0 -0
  45. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/kjob.py +0 -0
  46. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/kueue.py +0 -0
  47. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/monitoring.py +0 -0
  48. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/nap.py +0 -0
  49. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/network.py +0 -0
  50. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/nodepool.py +0 -0
  51. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/ray.py +0 -0
  52. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/remote_state/__init__.py +0 -0
  53. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/remote_state/fuse_remote_state.py +0 -0
  54. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/remote_state/remote_state_client.py +0 -0
  55. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/resources.py +0 -0
  56. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/scheduling.py +0 -0
  57. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/storage.py +0 -0
  58. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/system_characteristics.py +0 -0
  59. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/vertex.py +0 -0
  60. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/workload.py +0 -0
  61. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/workload_decorators/__init__.py +0 -0
  62. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/workload_decorators/rdma_decorator.py +0 -0
  63. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/workload_decorators/storage_decorator.py +0 -0
  64. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/core/workload_decorators/tcpxo_decorator.py +0 -0
  65. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/main.py +0 -0
  66. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/__init__.py +0 -0
  67. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/batch.py +0 -0
  68. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/cluster.py +0 -0
  69. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/common.py +0 -0
  70. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/config.py +0 -0
  71. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/core.py +0 -0
  72. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/info.py +0 -0
  73. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/inspector.py +0 -0
  74. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/job.py +0 -0
  75. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/kind.py +0 -0
  76. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/run.py +0 -0
  77. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/shell.py +0 -0
  78. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/validators.py +0 -0
  79. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/version.py +0 -0
  80. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/parser/workload.py +0 -0
  81. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/templates/__init__.py +0 -0
  82. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/templates/storage.yaml +0 -0
  83. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/__init__.py +0 -0
  84. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/console.py +0 -0
  85. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/file.py +0 -0
  86. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/gcs_utils.py +0 -0
  87. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/kubectl.py +0 -0
  88. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/network.py +0 -0
  89. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/objects.py +0 -0
  90. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/templates.py +0 -0
  91. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/validation.py +0 -0
  92. {xpk-0.7.0 → xpk-0.7.2}/src/xpk/utils/yaml.py +0 -0
  93. {xpk-0.7.0 → xpk-0.7.2}/src/xpk.egg-info/SOURCES.txt +0 -0
  94. {xpk-0.7.0 → xpk-0.7.2}/src/xpk.egg-info/dependency_links.txt +0 -0
  95. {xpk-0.7.0 → xpk-0.7.2}/src/xpk.egg-info/entry_points.txt +0 -0
  96. {xpk-0.7.0 → xpk-0.7.2}/src/xpk.egg-info/requires.txt +0 -0
  97. {xpk-0.7.0 → xpk-0.7.2}/src/xpk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: xpk
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: xpk helps Cloud developers to orchestrate training jobs on accelerators on GKE.
5
5
  Author-email: XPK team <xpk-code-reviewers@google.com>
6
6
  License: Apache-2.0
@@ -28,6 +28,7 @@ Requires-Dist: pylint>=2.6.0; extra == "dev"
28
28
  Requires-Dist: pre-commit; extra == "dev"
29
29
  Requires-Dist: pytest; extra == "dev"
30
30
  Requires-Dist: docker==7.1.0; extra == "dev"
31
+ Dynamic: license-file
31
32
 
32
33
  <!--
33
34
  Copyright 2023 Google LLC
@@ -498,6 +499,7 @@ Parameters:
498
499
  - `--readonly` - if set to true, workload can only read from storage.
499
500
  - `--size` - size of the storage in Gb.
500
501
  - `--bucket` - name of the storage bucket. If not set then the name of the storage is used as a bucket name.
502
+ - `--manifest` - path to the manifest file containing PersistentVolume and PresistentVolumeClaim definitions. If set, then values from manifest override the following parameters: `--size` and `--bucket`.
501
503
 
502
504
  ### Filestore
503
505
 
@@ -533,6 +535,7 @@ Commands `xpk storage create` and `xpk storage attach` with `--type=gcpfilestore
533
535
  - `--access-mode` - access mode of the Filestore instance that will be created. Possible values are: `[ReadWriteOnce, ReadOnlyMany, ReadWriteMany]`
534
536
  - `--vol` - file share name of the Filestore instance that will be created.
535
537
  - `--instance` - the name of the Filestore instance. If not set then the name parameter is used as an instance name. Useful when connecting multiple volumes from the same Filestore instance.
538
+ - `--manifest` - path to the manifest file containing PersistentVolume, PresistentVolumeClaim and StorageClass definitions. If set, then values from manifest override the following parameters: `--access-mode`, `--size` and `--volume`.
536
539
 
537
540
  ### List attached storages
538
541
 
@@ -467,6 +467,7 @@ Parameters:
467
467
  - `--readonly` - if set to true, workload can only read from storage.
468
468
  - `--size` - size of the storage in Gb.
469
469
  - `--bucket` - name of the storage bucket. If not set then the name of the storage is used as a bucket name.
470
+ - `--manifest` - path to the manifest file containing PersistentVolume and PresistentVolumeClaim definitions. If set, then values from manifest override the following parameters: `--size` and `--bucket`.
470
471
 
471
472
  ### Filestore
472
473
 
@@ -502,6 +503,7 @@ Commands `xpk storage create` and `xpk storage attach` with `--type=gcpfilestore
502
503
  - `--access-mode` - access mode of the Filestore instance that will be created. Possible values are: `[ReadWriteOnce, ReadOnlyMany, ReadWriteMany]`
503
504
  - `--vol` - file share name of the Filestore instance that will be created.
504
505
  - `--instance` - the name of the Filestore instance. If not set then the name parameter is used as an instance name. Useful when connecting multiple volumes from the same Filestore instance.
506
+ - `--manifest` - path to the manifest file containing PersistentVolume, PresistentVolumeClaim and StorageClass definitions. If set, then values from manifest override the following parameters: `--access-mode`, `--size` and `--volume`.
505
507
 
506
508
  ### List attached storages
507
509
 
@@ -48,7 +48,7 @@ dependencies = [
48
48
  "Bug Tracker" = "https://github.com/google/xpk/issues"
49
49
 
50
50
  [build-system]
51
- requires = ["setuptools>=61.0", "setuptools-git-versioning"]
51
+ requires = ["setuptools>=61.0"]
52
52
  build-backend = "setuptools.build_meta"
53
53
 
54
54
  [project.scripts]
@@ -16,6 +16,7 @@ limitations under the License.
16
16
 
17
17
  from argparse import Namespace
18
18
 
19
+ import yaml
19
20
  from kubernetes import client as k8s_client
20
21
  from kubernetes.client import ApiClient
21
22
  from kubernetes.client.rest import ApiException
@@ -72,9 +73,13 @@ def storage_create(args: Namespace) -> None:
72
73
  filestore_client.create_instance(
73
74
  vol=args.vol, size=args.size, tier=args.tier, network=filestore_network
74
75
  )
75
- manifest = filestore_client.manifest(
76
- args.name, args.vol, args.access_mode, filestore_network
77
- )
76
+ if args.manifest is not None:
77
+ with open(args.manifest, "r", encoding="utf-8") as f:
78
+ manifest = list(yaml.safe_load_all(f))
79
+ else:
80
+ manifest = filestore_client.manifest(
81
+ args.name, args.vol, args.access_mode, filestore_network
82
+ )
78
83
 
79
84
  k8s_api_client = setup_k8s_env(args)
80
85
  create_storage_crds(k8s_api_client, args, manifest)
@@ -137,22 +142,30 @@ def storage_attach(args: Namespace) -> None:
137
142
  xpk_print(f"Filestore instance {args.instance} does not exists.")
138
143
  xpk_exit(1)
139
144
 
140
- filestore_network = get_cluster_network(args)
141
- manifest = filestore_client.manifest(
142
- args.name, args.vol, args.access_mode, filestore_network
143
- )
145
+ if args.manifest is not None:
146
+ with open(args.manifest, "r", encoding="utf-8") as f:
147
+ manifest = list(yaml.safe_load_all(f))
148
+ else:
149
+ filestore_network = get_cluster_network(args)
150
+ manifest = filestore_client.manifest(
151
+ args.name, args.vol, args.access_mode, filestore_network
152
+ )
144
153
 
145
154
  else: # args.type == GCS_FUSE_TYPE:
146
- if args.size is None:
155
+ if args.manifest is None and args.size is None:
147
156
  xpk_print("--size is required when attaching gcsfuse storage.")
148
157
  xpk_exit(1)
149
158
 
150
159
  if args.bucket is None:
151
160
  args.bucket = args.name
152
161
 
153
- manifest = gcsfuse.manifest(
154
- name=args.name, bucket=args.bucket, size=args.size
155
- )
162
+ if args.manifest is not None:
163
+ with open(args.manifest, "r", encoding="utf-8") as f:
164
+ manifest = list(yaml.safe_load_all(f))
165
+ else:
166
+ manifest = gcsfuse.manifest(
167
+ name=args.name, bucket=args.bucket, size=args.size
168
+ )
156
169
 
157
170
  k8s_api_client = setup_k8s_env(args)
158
171
  create_storage_crds(k8s_api_client, args, manifest)
@@ -24,7 +24,7 @@ from ..utils.console import xpk_print
24
24
  from .system_characteristics import AcceleratorType, SystemCharacteristics
25
25
 
26
26
  # This is the version for XPK PyPI package
27
- __version__ = 'v0.7.0'
27
+ __version__ = 'v0.7.2'
28
28
  XPK_CURRENT_VERSION = __version__
29
29
  XPK_CONFIG_FILE = os.path.expanduser('~/.config/xpk/config.yaml')
30
30
 
@@ -87,20 +87,20 @@ def get_pathways_sidecar_container(args) -> str:
87
87
  str: yaml containing arguments for the Pathways sidecar container.
88
88
  """
89
89
  yaml = """initContainers:
90
- - name: remote-python-sidecar
91
- image: {args.remote_python_sidecar_image}
92
- imagePullPolicy: Always
93
- securityContext:
94
- privileged: true
95
- volumeMounts:
96
- - mountPath: /tmp # Shared volume mount with the main container.
97
- name: shared-tmp
98
- restartPolicy: Always
99
- ports:
100
- - containerPort: 50051
101
- env:
102
- - name: GRPC_SERVER_ADDRESS
103
- value: '0.0.0.0:50051'"""
90
+ - name: remote-python-sidecar
91
+ image: {args.remote_python_sidecar_image}
92
+ imagePullPolicy: Always
93
+ securityContext:
94
+ privileged: true
95
+ volumeMounts:
96
+ - mountPath: /tmp # Shared volume mount with the main container.
97
+ name: shared-tmp
98
+ restartPolicy: Always
99
+ ports:
100
+ - containerPort: 50051
101
+ env:
102
+ - name: GRPC_SERVER_ADDRESS
103
+ value: '0.0.0.0:50051'"""
104
104
  if args.use_pathways and args.remote_python_sidecar_image is not None:
105
105
  return yaml.format(args=args)
106
106
  else:
@@ -148,6 +148,11 @@ def add_storage_attach_parser(
148
148
  'Optional Arguments',
149
149
  'Optional arguments for storage create.',
150
150
  )
151
+ opt_args.add_argument(
152
+ '--manifest',
153
+ type=str,
154
+ help='Path to manifest file containing volume definitions',
155
+ )
151
156
  add_kind_cluster_arguments(opt_args)
152
157
 
153
158
 
@@ -238,6 +243,11 @@ def add_storage_create_parser(
238
243
  help='Access mode of created filestore instance',
239
244
  default='ReadWriteMany',
240
245
  )
246
+ opt_args.add_argument(
247
+ '--manifest',
248
+ type=str,
249
+ help='Path to manifest file containing volume definitions',
250
+ )
241
251
 
242
252
  add_kind_cluster_arguments(opt_args)
243
253
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: xpk
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: xpk helps Cloud developers to orchestrate training jobs on accelerators on GKE.
5
5
  Author-email: XPK team <xpk-code-reviewers@google.com>
6
6
  License: Apache-2.0
@@ -28,6 +28,7 @@ Requires-Dist: pylint>=2.6.0; extra == "dev"
28
28
  Requires-Dist: pre-commit; extra == "dev"
29
29
  Requires-Dist: pytest; extra == "dev"
30
30
  Requires-Dist: docker==7.1.0; extra == "dev"
31
+ Dynamic: license-file
31
32
 
32
33
  <!--
33
34
  Copyright 2023 Google LLC
@@ -498,6 +499,7 @@ Parameters:
498
499
  - `--readonly` - if set to true, workload can only read from storage.
499
500
  - `--size` - size of the storage in Gb.
500
501
  - `--bucket` - name of the storage bucket. If not set then the name of the storage is used as a bucket name.
502
+ - `--manifest` - path to the manifest file containing PersistentVolume and PresistentVolumeClaim definitions. If set, then values from manifest override the following parameters: `--size` and `--bucket`.
501
503
 
502
504
  ### Filestore
503
505
 
@@ -533,6 +535,7 @@ Commands `xpk storage create` and `xpk storage attach` with `--type=gcpfilestore
533
535
  - `--access-mode` - access mode of the Filestore instance that will be created. Possible values are: `[ReadWriteOnce, ReadOnlyMany, ReadWriteMany]`
534
536
  - `--vol` - file share name of the Filestore instance that will be created.
535
537
  - `--instance` - the name of the Filestore instance. If not set then the name parameter is used as an instance name. Useful when connecting multiple volumes from the same Filestore instance.
538
+ - `--manifest` - path to the manifest file containing PersistentVolume, PresistentVolumeClaim and StorageClass definitions. If set, then values from manifest override the following parameters: `--access-mode`, `--size` and `--volume`.
536
539
 
537
540
  ### List attached storages
538
541
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes