@@ -87,7 +87,83 @@ docker compose -f docker-compose.yml \
8787up -d
8888```
8989
90- ### 2. Manual Component Deployment
90+ ### 2. Using the Docker Compose Helper Script
91+
92+ For easier management of multiple compose files and image substitutions, use the ` docker-composer.sh ` script:
93+
94+ #### Basic Usage
95+
96+ ``` shell
97+ # Generate a composed configuration for development
98+ ./scripts/docker-composer.sh --dev -o dev-compose.yml
99+
100+ # Generate a composed configuration for production
101+ ./scripts/docker-composer.sh --prod -o prod-compose.yml
102+
103+ # Include specific model configurations
104+ ./scripts/docker-composer.sh --prod \
105+ -f docker-compose.llama-3b-gpu.yml \
106+ -f docker-compose.llama-8b-gpu.yml \
107+ -o production-compose.yml
108+ ```
109+
110+ #### Image Substitution
111+
112+ Replace default images with custom ones (useful for production deployments with specific image versions):
113+
114+ ``` shell
115+ # Production example with custom ECR images
116+ ./scripts/docker-composer.sh --prod \
117+ -f docker-compose.llama-3b-gpu.yml \
118+ --image ' nillion/nilai-api:latest=public.ecr.aws/k5d9x2g2/nilai-api:v0.1.0-rc1' \
119+ --image ' nillion/nilai-vllm:latest=public.ecr.aws/k5d9x2g2/nilai-vllm:v0.1.0-rc1' \
120+ --image ' nillion/nilai-attestation:latest=public.ecr.aws/k5d9x2g2/nilai-attestation:v0.1.0-rc1' \
121+ -o production-compose.yml
122+
123+ # Then deploy with the generated file
124+ docker compose -f production-compose.yml up -d
125+ ```
126+
127+ #### Script Options
128+
129+ - ` --dev ` : Include development-specific configurations
130+ - ` --prod ` : Include production-specific configurations
131+ - ` -f, --file <filename> ` : Include additional compose files from ` docker/compose/ ` directory
132+ - ` -o, --output <filename> ` : Specify output filename (default: ` output.yml ` )
133+ - ` --image <old=new> ` : Substitute Docker images (can be used multiple times)
134+ - ` -h, --help ` : Show help message
135+
136+ #### Production Deployment Example
137+
138+ For a complete production setup with custom images:
139+
140+ ``` shell
141+ # 1. Generate the production compose file
142+ ./scripts/docker-composer.sh --prod \
143+ -f docker/compose/docker-compose.llama-3b-gpu.yml \
144+ -f docker/compose/docker-compose.llama-8b-gpu.yml \
145+ --image ' nillion/nilai-api:latest=public.ecr.aws/k5d9x2g2/nilai-api:v0.2.0-alpha-0' \
146+ --image ' nillion/nilai-vllm:latest=public.ecr.aws/k5d9x2g2/nilai-vllm:v0.2.0-alpha-0' \
147+ --image ' nillion/nilai-attestation:latest=public.ecr.aws/k5d9x2g2/nilai-attestation:v0.2.0-alpha-0' \
148+ -o production-compose.yml
149+
150+ # Or:
151+ ./scripts/docker-composer.sh --prod \
152+ -f docker/compose/docker-compose.llama-70b-gpu.yml \
153+ --image ' nillion/nilai-api:latest=jcabrero/nillion-nilai-api:latest' \
154+ --image ' nillion/nilai-vllm:latest=public.ecr.aws/k5d9x2g2/nilai-vllm:v0.1.0-rc1' \
155+ --image ' nillion/nilai-attestation:latest=public.ecr.aws/k5d9x2g2/nilai-attestation:v0.1.0-rc1' \
156+ -o production-compose.yml
157+
158+
159+ # 2. Deploy using the generated file
160+ docker compose -f production-compose.yml up -d
161+
162+ # 3. Monitor logs
163+ docker compose -f production-compose.yml logs -f
164+ ```
165+
166+ ### 3. Manual Component Deployment
91167
92168#### Components
93169
0 commit comments