xmanager-slurm 0.3.1__py3-none-any.whl → 0.3.2__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.
Potentially problematic release.
This version of xmanager-slurm might be problematic. Click here for more details.
- xm_slurm/executables.py +5 -0
- xm_slurm/packageables.py +5 -0
- xm_slurm/templates/docker/docker-bake.hcl.j2 +7 -0
- {xmanager_slurm-0.3.1.dist-info → xmanager_slurm-0.3.2.dist-info}/METADATA +1 -1
- {xmanager_slurm-0.3.1.dist-info → xmanager_slurm-0.3.2.dist-info}/RECORD +6 -6
- {xmanager_slurm-0.3.1.dist-info → xmanager_slurm-0.3.2.dist-info}/WHEEL +0 -0
xm_slurm/executables.py
CHANGED
|
@@ -14,6 +14,7 @@ class Dockerfile(xm.ExecutableSpec):
|
|
|
14
14
|
dockerfile: The path to the Dockerfile.
|
|
15
15
|
context: The path to the Docker context.
|
|
16
16
|
target: The Docker build target.
|
|
17
|
+
ssh: A list of docker SSH sockets/keys.
|
|
17
18
|
build_args: Build arguments to docker.
|
|
18
19
|
cache_from: Where to pull the BuildKit cache from. See `--cache-from` in `docker build`.
|
|
19
20
|
workdir: The working directory in container.
|
|
@@ -29,6 +30,9 @@ class Dockerfile(xm.ExecutableSpec):
|
|
|
29
30
|
# Docker build target
|
|
30
31
|
target: str | None = None
|
|
31
32
|
|
|
33
|
+
# SSH sockets/keys for the docker build step.
|
|
34
|
+
ssh: list[str] = dataclasses.field(default_factory=list)
|
|
35
|
+
|
|
32
36
|
# Build arguments to docker
|
|
33
37
|
build_args: Mapping[str, str] = dataclasses.field(default_factory=dict)
|
|
34
38
|
|
|
@@ -56,6 +60,7 @@ class Dockerfile(xm.ExecutableSpec):
|
|
|
56
60
|
self.dockerfile,
|
|
57
61
|
self.context,
|
|
58
62
|
self.target,
|
|
63
|
+
tuple(sorted(self.ssh)),
|
|
59
64
|
tuple(sorted(self.build_args.items())),
|
|
60
65
|
tuple(sorted(self.cache_from)),
|
|
61
66
|
self.workdir,
|
xm_slurm/packageables.py
CHANGED
|
@@ -40,6 +40,7 @@ def docker_container(
|
|
|
40
40
|
dockerfile: pathlib.Path | None = None,
|
|
41
41
|
context: pathlib.Path | None = None,
|
|
42
42
|
target: str | None = None,
|
|
43
|
+
ssh: list[str] | None = None,
|
|
43
44
|
build_args: Mapping[str, str] = immutabledict.immutabledict(),
|
|
44
45
|
cache_from: str | Sequence[str] | None = None,
|
|
45
46
|
labels: Mapping[str, str] = immutabledict.immutabledict(),
|
|
@@ -54,6 +55,7 @@ def docker_container(
|
|
|
54
55
|
dockerfile: The path to the dockerfile.
|
|
55
56
|
context: The path to the docker context.
|
|
56
57
|
target: The docker build target.
|
|
58
|
+
ssh: A list of SSH sockets/keys for the docker build step.
|
|
57
59
|
build_args: Build arguments to docker.
|
|
58
60
|
cache_from: Where to pull the BuildKit cache from. See `--cache-from` in `docker build`.
|
|
59
61
|
labels: The container labels.
|
|
@@ -69,6 +71,8 @@ def docker_container(
|
|
|
69
71
|
if dockerfile is None:
|
|
70
72
|
dockerfile = context / "Dockerfile"
|
|
71
73
|
dockerfile = dockerfile.resolve()
|
|
74
|
+
if ssh is None:
|
|
75
|
+
ssh = []
|
|
72
76
|
if cache_from is None and isinstance(executor_spec, SlurmSpec):
|
|
73
77
|
cache_from = executor_spec.tag
|
|
74
78
|
if cache_from is None:
|
|
@@ -82,6 +86,7 @@ def docker_container(
|
|
|
82
86
|
dockerfile=dockerfile,
|
|
83
87
|
context=context,
|
|
84
88
|
target=target,
|
|
89
|
+
ssh=ssh,
|
|
85
90
|
build_args=build_args,
|
|
86
91
|
cache_from=cache_from,
|
|
87
92
|
workdir=workdir,
|
|
@@ -4,6 +4,13 @@ target "{{ hash(executable) }}" {
|
|
|
4
4
|
{{ executable.dockerfile.read_text() }}
|
|
5
5
|
EOF
|
|
6
6
|
context = "{{ executable.context }}"
|
|
7
|
+
{% if executable.ssh %}
|
|
8
|
+
ssh = [
|
|
9
|
+
{% for ssh_val in executable.ssh %}
|
|
10
|
+
"{{ ssh_val }}"{% if not loop.last %},{% endif %}
|
|
11
|
+
{% endfor %}
|
|
12
|
+
]
|
|
13
|
+
{% endif %}
|
|
7
14
|
{% if executable.target %}
|
|
8
15
|
target = "{{ executable.target }}"
|
|
9
16
|
{% endif %}
|
|
@@ -5,12 +5,12 @@ xm_slurm/config.py,sha256=St2bdp2m2pajGxivmsRkmZrKd-inBKF7Hn6oezTT9zM,4955
|
|
|
5
5
|
xm_slurm/console.py,sha256=UpMqeJ0C8i0pkue1AHnnyyX0bFJ9zZeJ7HBR6yhuA8A,54
|
|
6
6
|
xm_slurm/contrib/clusters/__init__.py,sha256=BM9W2iJE3616uwAUdj1uqcXF70zunXlxWHEXgLdH2xs,1600
|
|
7
7
|
xm_slurm/contrib/clusters/drac.py,sha256=Tl4Cv0DOHssJcnTU5c60w0Ye3dwlDZE4AkPtmew6-lQ,5201
|
|
8
|
-
xm_slurm/executables.py,sha256=
|
|
8
|
+
xm_slurm/executables.py,sha256=G62nACUyki7Jwif3w6c6h3t88ebiv_w9ISYWeeAUVFo,5959
|
|
9
9
|
xm_slurm/execution.py,sha256=EDckbWYtBoMAc0yWU-BitFWGPOkA-AxoQRFv7XdUNcA,17998
|
|
10
10
|
xm_slurm/executors.py,sha256=vilogTjlxHLfZDms4aYOZWUW8w-2IdxU7xh-9vcW1Y0,4723
|
|
11
11
|
xm_slurm/experiment.py,sha256=y5K-kZgavRk022IGXw5bg7beX4cnU1JtUOeP9824sRA,25578
|
|
12
12
|
xm_slurm/job_blocks.py,sha256=1H1eZ5gbEGEoDYcoSh8S_gvp04MLXP7G128crDJlMYo,482
|
|
13
|
-
xm_slurm/packageables.py,sha256=
|
|
13
|
+
xm_slurm/packageables.py,sha256=mHG2ackEKh1Qg0HdIP72uDZt-9j4qvsW-l_WScdWMes,11375
|
|
14
14
|
xm_slurm/packaging/__init__.py,sha256=dh307yLpUT9KN7rJ1e9fYC6hegGKfZcGboUq9nGpDVQ,233
|
|
15
15
|
xm_slurm/packaging/docker/__init__.py,sha256=SQxaDtomYc4NwZ5lSoCiMoy2S2lRmc0sgwVMbENIatU,2474
|
|
16
16
|
xm_slurm/packaging/docker/abc.py,sha256=f8XvUA_FusIpXI45PR5isA2msxM003ycW5mWbAyiKfk,3830
|
|
@@ -21,7 +21,7 @@ xm_slurm/packaging/router.py,sha256=6qjtsy4BoYgSaQzC_pQSHVHeWcphG_xWVsWgW6ALC7U,
|
|
|
21
21
|
xm_slurm/packaging/utils.py,sha256=dCWAuUXT5COXGe1BQEW8luo5patxTeLSAGOWPR63iY8,6219
|
|
22
22
|
xm_slurm/resources.py,sha256=FqAULBhchu6z66On3SRDOJvXfs0sLGfBvcMGUUB3jxU,4835
|
|
23
23
|
xm_slurm/status.py,sha256=4BUBm-qwVWH_RJGzRxO8Eom5d92_cp8jydQVwqH8v6U,6653
|
|
24
|
-
xm_slurm/templates/docker/docker-bake.hcl.j2,sha256=
|
|
24
|
+
xm_slurm/templates/docker/docker-bake.hcl.j2,sha256=ClsFpj91Mr1VfA8L6eqBG3HQz0Z8VenF6mEfmAhQgUo,1498
|
|
25
25
|
xm_slurm/templates/docker/mamba.Dockerfile,sha256=vsOYkm-T33C2RanwbdjJIUjhPJ_H1NDBeEACguQJZ8c,716
|
|
26
26
|
xm_slurm/templates/docker/pdm.Dockerfile,sha256=Yg5-lOXkNVJr0OER_yOnRvn9NlFLnt3RfdYfq4f0ilg,748
|
|
27
27
|
xm_slurm/templates/docker/python.Dockerfile,sha256=O6lHesmsLz7cX-efVQpsafEVYmbHPyV73xA9WbBKGKg,738
|
|
@@ -33,6 +33,6 @@ xm_slurm/templates/slurm/job.bash.j2,sha256=EUeq3P2xqTIqlHi2SVhFBT7NL4lUj8okYUa3
|
|
|
33
33
|
xm_slurm/templates/slurm/runtimes/apptainer.bash.j2,sha256=dMntzelhs8DqKyIpO9S6wzMfH2PDevmgvyjCW8Xc2dY,3222
|
|
34
34
|
xm_slurm/templates/slurm/runtimes/podman.bash.j2,sha256=xKXYFvQvazMx0PgvmlRXR6eecoiBUl8y52dIzQtWkBE,1469
|
|
35
35
|
xm_slurm/utils.py,sha256=PNd0vTn33UKm5LpC41TdO9QIFe21V5A0RbYEhQIMjrA,1930
|
|
36
|
-
xmanager_slurm-0.3.
|
|
37
|
-
xmanager_slurm-0.3.
|
|
38
|
-
xmanager_slurm-0.3.
|
|
36
|
+
xmanager_slurm-0.3.2.dist-info/METADATA,sha256=wQy1L_EjWG6foDa1iClRQT0-_iC6LMMh5E30_GHEePc,909
|
|
37
|
+
xmanager_slurm-0.3.2.dist-info/WHEEL,sha256=vnE8JVcI2Wz7GRKorsPArnBdnW2SWKWGow5gu5tHlRU,90
|
|
38
|
+
xmanager_slurm-0.3.2.dist-info/RECORD,,
|
|
File without changes
|