-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local-infra.yml
More file actions
87 lines (81 loc) · 2.35 KB
/
Copy pathdocker-compose.local-infra.yml
File metadata and controls
87 lines (81 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# docker-compose.local-infra.yml
# Local emulation: compute-plane infrastructure
# Emulates Kubernetes (K3s) and Slurm scheduling.
# Pair with docker-compose.aws-emulator.yml for AWS APIs and docker-compose.dev.yml for the data plane.
#
# Usage:
# docker compose -f docker-compose.aws-emulator.yml -f docker-compose.dev.yml -f docker-compose.local-infra.yml up
# or separately:
# docker compose -f docker-compose.local-infra.yml up
#
# DeploymentProfile: local_emulation
services:
# ── Kubernetes in Docker (K3s) ─────────────────────────────────────────────
k3s:
image: rancher/k3s:v1.29.4-k3s1
container_name: ml_deploy_k3s
privileged: true
command: server --disable traefik --disable metrics-server
ports:
- "6443:6443" # Kubernetes API
- "8080:8080"
environment:
- K3S_KUBECONFIG_OUTPUT=/output/kubeconfig.yaml
- K3S_KUBECONFIG_MODE=666
volumes:
- k3s_data:/var/lib/rancher/k3s
- k3s_output:/output
networks:
- ml_local
healthcheck:
test: ["CMD", "k3s", "kubectl", "get", "nodes"]
interval: 30s
timeout: 15s
retries: 10
start_period: 60s
# ── Slurm cluster (controller + worker) ───────────────────────────────────
slurmctld:
image: nathanhess/slurm:latest
container_name: ml_deploy_slurmctld
hostname: slurmctld
command: ["slurm_controller"]
ports:
- "6817:6817" # slurmctld port
volumes:
- slurm_shared:/shared
- slurm_state:/var/spool/slurmctld
networks:
ml_local:
aliases:
- slurmctld
healthcheck:
test: ["CMD", "scontrol", "ping"]
interval: 20s
timeout: 10s
retries: 6
start_period: 30s
slurmd:
image: nathanhess/slurm:latest
container_name: ml_deploy_slurmd
hostname: slurmd
command: ["slurm_worker"]
depends_on:
slurmctld:
condition: service_healthy
volumes:
- slurm_shared:/shared
networks:
ml_local:
aliases:
- slurmd
environment:
- SLURM_CONTROLLER_HOST=slurmctld
volumes:
k3s_data:
k3s_output:
slurm_shared:
slurm_state:
networks:
ml_local:
name: ml_local
driver: bridge