@@ -77,6 +77,54 @@ cd ci_analysis_agent
7777
7878# Skip model download (if you already have it)
7979./quick-start-containers.sh --no-model
80+
81+ # GPU acceleration options
82+ ./quick-start-containers.sh --gpu nvidia # Force NVIDIA GPU
83+ ./quick-start-containers.sh --gpu amd # Force AMD GPU
84+ ./quick-start-containers.sh --cpu-only # Force CPU-only mode
85+ ```
86+
87+ ** Container Management Options:**
88+ ``` bash
89+ # Stop running containers
90+ ./quick-start-containers.sh --stop
91+
92+ # Complete cleanup (containers, volumes, images, pods)
93+ ./quick-start-containers.sh --clean-all
94+
95+ # Selective cleanup options
96+ ./quick-start-containers.sh --remove-volumes # Remove persistent volumes (loses model data)
97+ ./quick-start-containers.sh --remove-images # Remove container images (forces re-download)
98+ ./quick-start-containers.sh --remove-pods # Remove pods (for pod-based deployments)
99+ ```
100+
101+ ### Complete Lifecycle Management
102+
103+ The ` quick-start-containers.sh ` script provides comprehensive lifecycle management:
104+
105+ ``` bash
106+ # 🚀 Initial deployment
107+ ./quick-start-containers.sh
108+
109+ # 🛑 Stop running containers (preserves data)
110+ ./quick-start-containers.sh --stop
111+
112+ # 🔄 Restart containers (if already deployed)
113+ podman start ollama ci-analysis-agent
114+
115+ # 🧹 Clean up specific resources
116+ ./quick-start-containers.sh --remove-volumes # Remove persistent volumes
117+ ./quick-start-containers.sh --remove-images # Remove container images
118+ ./quick-start-containers.sh --remove-pods # Remove pods
119+
120+ # 🗑️ Complete cleanup and fresh start
121+ ./quick-start-containers.sh --clean-all # Remove everything
122+ ./quick-start-containers.sh # Fresh deployment
123+
124+ # 🔧 Maintenance operations
125+ ./quick-start-containers.sh --cleanup # Clean up before starting
126+ ./quick-start-containers.sh --no-model # Skip model download
127+ ./quick-start-containers.sh --gpu nvidia # Force specific GPU
80128```
81129
82130### Manual Step-by-Step Setup
@@ -532,6 +580,24 @@ podman run -d \
532580
533581### Starting and Stopping
534582
583+ #### Automated Container Management (Recommended)
584+
585+ ``` bash
586+ # Stop containers using the script
587+ ./quick-start-containers.sh --stop
588+
589+ # Start containers (if already deployed)
590+ podman start ollama ci-analysis-agent
591+
592+ # Or restart deployment from scratch
593+ ./quick-start-containers.sh
594+
595+ # Clean up and restart fresh
596+ ./quick-start-containers.sh --cleanup
597+ ```
598+
599+ #### Manual Container Management
600+
535601``` bash
536602# Start all containers in pod
537603podman pod start ci-analysis-pod
@@ -685,7 +751,29 @@ sudo setenforce 0
685751
686752## 🧹 Cleanup
687753
688- ### Remove Containers and Volumes
754+ ### Automated Cleanup (Recommended)
755+
756+ The ` quick-start-containers.sh ` script provides convenient cleanup options:
757+
758+ ``` bash
759+ # Complete cleanup - removes everything (containers, volumes, images, pods)
760+ ./quick-start-containers.sh --clean-all
761+
762+ # Selective cleanup options
763+ ./quick-start-containers.sh --remove-volumes # Only remove persistent volumes (loses model data)
764+ ./quick-start-containers.sh --remove-images # Only remove container images (forces re-download)
765+ ./quick-start-containers.sh --remove-pods # Only remove pods (for pod-based deployments)
766+ ```
767+
768+ ** ⚠️ Important Notes:**
769+ - ` --clean-all ` removes ** everything** including downloaded models
770+ - ` --remove-volumes ` will delete all Ollama models (requires re-download)
771+ - ` --remove-images ` will delete container images (requires re-download)
772+ - Use selective options if you want to preserve certain resources
773+
774+ ### Manual Cleanup
775+
776+ For more granular control, use manual podman commands:
689777
690778``` bash
691779# Stop and remove all containers in pod
@@ -725,7 +813,20 @@ podman network prune
725813
726814## 🔄 Updates and Maintenance
727815
728- ### Updating Containers
816+ ### Automated Updates (Recommended)
817+
818+ ``` bash
819+ # Update the codebase
820+ git pull origin main
821+
822+ # Clean up old containers and images
823+ ./quick-start-containers.sh --clean-all
824+
825+ # Deploy with latest code and images
826+ ./quick-start-containers.sh
827+ ```
828+
829+ ### Manual Updates
729830
730831``` bash
731832# Pull latest images
@@ -745,6 +846,22 @@ podman rm ci-analysis-agent ollama
745846# (Use your preferred method from above)
746847```
747848
849+ ### Maintenance Operations
850+
851+ ``` bash
852+ # Regular maintenance - clean up unused resources
853+ ./quick-start-containers.sh --remove-images # Remove old images
854+ podman system prune -f # Clean up unused resources
855+
856+ # Model management
857+ ./quick-start-containers.sh --remove-volumes # Remove models (if needed)
858+ ./quick-start-containers.sh --no-model # Skip model download on restart
859+
860+ # Performance optimization
861+ ./quick-start-containers.sh --gpu nvidia # Ensure GPU acceleration
862+ ./quick-start-containers.sh --cleanup # Clean restart for performance
863+ ```
864+
748865### Backup and Restore
749866
750867``` bash
@@ -821,4 +938,56 @@ sudo systemctl enable --now ollama.service
821938--tmpfs /tmp:rw,noexec,nosuid,size=2g
822939```
823940
941+ ## 📋 Quick Reference
942+
943+ ### Script Command Summary
944+
945+ ``` bash
946+ # Deployment
947+ ./quick-start-containers.sh # Start with auto GPU detection
948+ ./quick-start-containers.sh --gpu nvidia # Force NVIDIA GPU
949+ ./quick-start-containers.sh --gpu amd # Force AMD GPU
950+ ./quick-start-containers.sh --cpu-only # Force CPU-only mode
951+ ./quick-start-containers.sh -m llama3:8b # Use different model
952+ ./quick-start-containers.sh -p 3000 # Use different port
953+
954+ # Management
955+ ./quick-start-containers.sh --stop # Stop running containers
956+ ./quick-start-containers.sh --cleanup # Clean up before starting
957+
958+ # Cleanup
959+ ./quick-start-containers.sh --clean-all # Remove everything
960+ ./quick-start-containers.sh --remove-volumes # Remove persistent volumes only
961+ ./quick-start-containers.sh --remove-images # Remove container images only
962+ ./quick-start-containers.sh --remove-pods # Remove pods only
963+
964+ # Advanced
965+ ./quick-start-containers.sh --no-model # Skip model download
966+ ./quick-start-containers.sh --help # Show all options
967+ ```
968+
969+ ### Common Workflows
970+
971+ ``` bash
972+ # Fresh deployment
973+ ./quick-start-containers.sh
974+
975+ # Stop temporarily (preserves data)
976+ ./quick-start-containers.sh --stop
977+ podman start ollama ci-analysis-agent # Resume later
978+
979+ # Update deployment
980+ git pull origin main
981+ ./quick-start-containers.sh --clean-all
982+ ./quick-start-containers.sh
983+
984+ # Switch models
985+ ./quick-start-containers.sh --remove-volumes
986+ ./quick-start-containers.sh -m llama3:8b
987+
988+ # Troubleshooting
989+ ./quick-start-containers.sh --cleanup # Clean restart
990+ ./quick-start-containers.sh --cpu-only # Disable GPU if issues
991+ ```
992+
824993This containerized approach provides a clean, isolated environment for running the CI Analysis Agent with excellent portability and reproducibility across different systems.
0 commit comments