# 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`