docker-devkit 0.1.2__py3-none-any.whl → 0.1.3__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.
- docker_devkit/build_docker.py +12 -9
- docker_devkit/down.py +12 -9
- docker_devkit/up.py +13 -10
- {docker_devkit-0.1.2.dist-info → docker_devkit-0.1.3.dist-info}/METADATA +1 -1
- docker_devkit-0.1.3.dist-info/RECORD +15 -0
- docker_devkit-0.1.2.dist-info/RECORD +0 -15
- {docker_devkit-0.1.2.dist-info → docker_devkit-0.1.3.dist-info}/WHEEL +0 -0
- {docker_devkit-0.1.2.dist-info → docker_devkit-0.1.3.dist-info}/entry_points.txt +0 -0
- {docker_devkit-0.1.2.dist-info → docker_devkit-0.1.3.dist-info}/licenses/LICENSE +0 -0
- {docker_devkit-0.1.2.dist-info → docker_devkit-0.1.3.dist-info}/licenses/NOTICE +0 -0
docker_devkit/build_docker.py
CHANGED
|
@@ -5,7 +5,7 @@ import os
|
|
|
5
5
|
import platform
|
|
6
6
|
import re
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Any, Literal
|
|
8
|
+
from typing import Annotated, Any, Literal
|
|
9
9
|
|
|
10
10
|
import typer
|
|
11
11
|
import yaml
|
|
@@ -103,18 +103,21 @@ def _load_compose(path: Path) -> dict[str, Any]:
|
|
|
103
103
|
def build(
|
|
104
104
|
upgrade: bool = typer.Option(False, "--upgrade", "-u", help="Re-resolve and rewrite base digests."),
|
|
105
105
|
lock_only: bool = typer.Option(False, "--lock-only", help="Update lock file without building images."),
|
|
106
|
-
mode:
|
|
107
|
-
|
|
106
|
+
mode: Annotated[
|
|
107
|
+
Mode, typer.Option("--mode", help="local: --load images; ci: --push images + registry caches.")
|
|
108
|
+
] = "local",
|
|
109
|
+
gpu: Annotated[Gpu, typer.Option("--gpu", help="auto|cuda|rocm|none")] = "auto",
|
|
108
110
|
gpu_only: bool = typer.Option(
|
|
109
111
|
False, "--gpu-only", help="Build only the services suffixed for this gpu (requires a concrete --gpu)."
|
|
110
112
|
),
|
|
111
113
|
no_cache: bool = typer.Option(False, "--no-cache", help="Force rebuild by disabling cache usage."),
|
|
112
|
-
targets_opt:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
targets_opt: Annotated[
|
|
115
|
+
list[str] | None,
|
|
116
|
+
typer.Option("--targets", "-t", help="Build only these services (from the selected bake file)."),
|
|
117
|
+
] = None,
|
|
118
|
+
bake_file: Annotated[
|
|
119
|
+
Path, typer.Option("--bake-file", help="Bake file to load (e.g. compose.bake.yml or compose.zed.bake.yml).")
|
|
120
|
+
] = DEFAULT_BAKE_FILE,
|
|
118
121
|
) -> None:
|
|
119
122
|
run_build(
|
|
120
123
|
upgrade=upgrade,
|
docker_devkit/down.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from pathlib import Path
|
|
3
|
+
from typing import Annotated
|
|
3
4
|
|
|
4
5
|
import typer
|
|
5
6
|
from bashrun import bash_handoff
|
|
@@ -23,16 +24,18 @@ app = typer.Typer(add_completion=False)
|
|
|
23
24
|
@app.command()
|
|
24
25
|
def down(
|
|
25
26
|
volumes: bool = typer.Option(False, "--volumes", "-v", help="Remove named volumes."),
|
|
26
|
-
gpu: Gpu
|
|
27
|
-
compose_file:
|
|
28
|
-
Path
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
gpu: Annotated[Gpu, typer.Option("--gpu", help="auto|cuda|rocm|none")] = "auto",
|
|
28
|
+
compose_file: Annotated[
|
|
29
|
+
Path,
|
|
30
|
+
typer.Option(
|
|
31
|
+
"--compose-file",
|
|
32
|
+
help=(
|
|
33
|
+
"Base compose file. In a repo that authors its own stack (where compose.bake.yml lives) the default "
|
|
34
|
+
"compose.yml tears down the native multi-file stack. A consumer stack is torn down as the single graph "
|
|
35
|
+
"it was brought up as."
|
|
36
|
+
),
|
|
34
37
|
),
|
|
35
|
-
),
|
|
38
|
+
] = Path("compose.yml"),
|
|
36
39
|
) -> None:
|
|
37
40
|
# Mirror up: native multi-file teardown only when compose.bake.yml is present and the
|
|
38
41
|
# default compose.yml was requested. A consumer stack tears down its single graph.
|
docker_devkit/up.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from pathlib import Path
|
|
3
|
+
from typing import Annotated
|
|
3
4
|
|
|
4
5
|
import typer
|
|
5
6
|
from bashrun import bash_handoff
|
|
@@ -33,18 +34,20 @@ def up(
|
|
|
33
34
|
build: bool = typer.Option(
|
|
34
35
|
False, "--build", help="Build all images locally before bringing the stack up; skips pulling"
|
|
35
36
|
),
|
|
36
|
-
gpu: Gpu
|
|
37
|
+
gpu: Annotated[Gpu, typer.Option("--gpu", help="auto|cuda|rocm|none")] = "auto",
|
|
37
38
|
no_dev: bool = typer.Option(False, "--no-dev", help="Skip layering compose.dev.yml (production-shape bring-up)"),
|
|
38
|
-
compose_file:
|
|
39
|
-
Path
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
compose_file: Annotated[
|
|
40
|
+
Path,
|
|
41
|
+
typer.Option(
|
|
42
|
+
"--compose-file",
|
|
43
|
+
help=(
|
|
44
|
+
"Base compose file. In a repo that authors its own images (where compose.bake.yml lives) the default "
|
|
45
|
+
"compose.yml triggers the native multi-file assembly. A consumer stack — a repo whose compose.yml "
|
|
46
|
+
"OCI-pulls an already-baked upstream artifact and layers on top — is run as the complete graph with "
|
|
47
|
+
"only --env-file .env."
|
|
48
|
+
),
|
|
46
49
|
),
|
|
47
|
-
),
|
|
50
|
+
] = Path("compose.yml"),
|
|
48
51
|
) -> None:
|
|
49
52
|
# A repo that authors its own stack carries compose.bake.yml and builds its own images,
|
|
50
53
|
# so the default compose.yml means the native multi-file stack (postgres + gpu + dev layers,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
docker_devkit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
docker_devkit/build_docker.py,sha256=s9wIS3jxz-nmJc7MpDwr6k5MXcl6NPQ5IoGizFNNrM0,11935
|
|
3
|
+
docker_devkit/context_sha.py,sha256=KWwJtIKfgKkogYoPL7_KEcKX8XG3i-P6_ReIOkB5wE4,3085
|
|
4
|
+
docker_devkit/detect_gpu.py,sha256=V7X-eu-q0HrJo_rFmviOor62tm1yKjR2PX2RLnv7JBw,451
|
|
5
|
+
docker_devkit/down.py,sha256=jRpt8IpE9P258squqEuq73j8H9PyASArM0PDavE4H7g,2763
|
|
6
|
+
docker_devkit/image_refs.py,sha256=PxYDVLkP43Gmc2Qh-R5AnpwYqkaZFD-uvAE-hWpJlho,6436
|
|
7
|
+
docker_devkit/modes.py,sha256=-6mNyvu3G97PzJ2vsfnXr5LwQhjvhlDfd11u6rkhN6M,1510
|
|
8
|
+
docker_devkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
docker_devkit/up.py,sha256=UYUDMTg1vQ8JQrJidqPvEgBVt1ExbSHhUF4XWJljV9w,4180
|
|
10
|
+
docker_devkit-0.1.3.dist-info/METADATA,sha256=DhDKIwe5CPLFOdA49XPWc5LVDeVdk8ujKuO2Lgj_qEE,399
|
|
11
|
+
docker_devkit-0.1.3.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
12
|
+
docker_devkit-0.1.3.dist-info/entry_points.txt,sha256=0AJlYxdEuQ7w21s1y-07MJ4AU_aJBUfkVWrwrxCqaMI,113
|
|
13
|
+
docker_devkit-0.1.3.dist-info/licenses/LICENSE,sha256=RFhQPdSOiMTguUX7JSoIuTxA7HVzCbj_p8WU36HjUQQ,10947
|
|
14
|
+
docker_devkit-0.1.3.dist-info/licenses/NOTICE,sha256=jvglZza3GCdN7v4_TLuXUqX9C_uABlwAKUkcIeKwk_8,26
|
|
15
|
+
docker_devkit-0.1.3.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
docker_devkit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
docker_devkit/build_docker.py,sha256=DHv2hbnUPENyZVbmyjW5AZoVmoL-VMNPakAD37CMS_g,11857
|
|
3
|
-
docker_devkit/context_sha.py,sha256=KWwJtIKfgKkogYoPL7_KEcKX8XG3i-P6_ReIOkB5wE4,3085
|
|
4
|
-
docker_devkit/detect_gpu.py,sha256=V7X-eu-q0HrJo_rFmviOor62tm1yKjR2PX2RLnv7JBw,451
|
|
5
|
-
docker_devkit/down.py,sha256=IMl-sjsLfa53sETcss6mEiAGEUhNIo3jYvKHg-t3xqA,2669
|
|
6
|
-
docker_devkit/image_refs.py,sha256=PxYDVLkP43Gmc2Qh-R5AnpwYqkaZFD-uvAE-hWpJlho,6436
|
|
7
|
-
docker_devkit/modes.py,sha256=-6mNyvu3G97PzJ2vsfnXr5LwQhjvhlDfd11u6rkhN6M,1510
|
|
8
|
-
docker_devkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
docker_devkit/up.py,sha256=_8oZY0DBCC4mroWPjFC6wPIW0raPPwUXFMRoCFU57Cs,4082
|
|
10
|
-
docker_devkit-0.1.2.dist-info/METADATA,sha256=cL0qTV-32EElpdqlH-W_iTy0qhtcvpP53LBMP9R6ZRQ,399
|
|
11
|
-
docker_devkit-0.1.2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
12
|
-
docker_devkit-0.1.2.dist-info/entry_points.txt,sha256=0AJlYxdEuQ7w21s1y-07MJ4AU_aJBUfkVWrwrxCqaMI,113
|
|
13
|
-
docker_devkit-0.1.2.dist-info/licenses/LICENSE,sha256=RFhQPdSOiMTguUX7JSoIuTxA7HVzCbj_p8WU36HjUQQ,10947
|
|
14
|
-
docker_devkit-0.1.2.dist-info/licenses/NOTICE,sha256=jvglZza3GCdN7v4_TLuXUqX9C_uABlwAKUkcIeKwk_8,26
|
|
15
|
-
docker_devkit-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|