Files
foxhunt/scripts/LOCAL_CI_QUICK_REF.md

133 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Local CI/CD Pipeline - Quick Reference
**Script**: `scripts/local_ci_pipeline.sh`
**Status**: ✅ Production Ready
---
## Quick Commands
```bash
# Full pipeline (Build + Test + Push)
./scripts/local_ci_pipeline.sh
# Test only (skip push)
./scripts/local_ci_pipeline.sh --skip-push
# Dry-run (show commands)
./scripts/local_ci_pipeline.sh --dry-run
# Verbose output
./scripts/local_ci_pipeline.sh --verbose --skip-push
```
---
## Pipeline Stages
| Stage | Emoji | Duration | Description |
|-------|-------|----------|-------------|
| 0. Pre-flight | 🔍 | <5s | Docker, git, Dockerfile checks |
| 1. Build | 🔨 | 2-3 min | Build Docker image |
| 2. Test | 🧪 | 10-20s | GLIBC, CUDA, entrypoint validation |
| 3. Push | 🚀 | 1-5 min | Push to Docker Hub |
---
## Test Checklist
- ✅ GLIBC 2.35 (Ubuntu 22.04)
- ✅ CUDA 12.4.1 libraries
- ✅ cuDNN 9 libraries
- ✅ Entrypoint scripts
- ✅ Volume mount architecture
---
## Expected Output
```
========================================
🚀 LOCAL CI/CD PIPELINE SIMULATOR
========================================
🔍 STAGE 0: PRE-FLIGHT CHECKS
✓ All required commands available
✓ Docker daemon running
⏱ Pre-flight checks completed in 0m 1s
🔨 STAGE 1: BUILD
✓ Docker image built successfully: 7.73 GB
⏱ Build completed in 0m 17s
🧪 STAGE 2: TEST
✓ GLIBC 2.35 validated
✓ CUDA libraries validated
✓ Binary GLIBC dependencies validated
✓ Entrypoint scripts validated
⏱ Test completed in 0m 3s
========================================
✅ PIPELINE COMPLETE
========================================
✓ Total pipeline time: 0m 20s
GitLab CI/CD readiness: ✅
```
---
## Troubleshooting
| Error | Fix |
|-------|-----|
| Docker daemon not running | `sudo systemctl start docker` |
| Docker Hub auth failed | `docker login` |
| GLIBC version mismatch | Check Dockerfile base image |
| CUDA libraries missing | Check cudnn-devel variant |
---
## GitLab CI/CD Integration
```yaml
# .gitlab-ci.yml
stages: [build, test, push]
build:
stage: build
script:
- docker build -f Dockerfile.runpod -t jgrusewski/foxhunt:latest .
test:
stage: test
script:
- docker run --rm --entrypoint /bin/bash jgrusewski/foxhunt:latest -c "ldd --version | grep 2.35"
- docker run --rm --entrypoint /bin/bash jgrusewski/foxhunt:latest -c "ldconfig -p | grep libcublas"
push:
stage: push
script:
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_TOKEN
- docker push jgrusewski/foxhunt:latest
```
---
## Performance
| Metric | Value |
|--------|-------|
| Total time | 4-9 min |
| Image size | 7.73 GB |
| Test time | 10-20s |
| Cost | $0 (local) |
---
## Files
- Script: `/scripts/local_ci_pipeline.sh`
- Guide: `/LOCAL_CI_PIPELINE_GUIDE.md`
- Validation: `/LOCAL_CI_PIPELINE_VALIDATION.md`
- Dockerfile: `/Dockerfile.runpod`