@@ -77,6 +77,54 @@ cd ci_analysis_agent
77
77
78
78
# Skip model download (if you already have it)
79
79
./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
80
128
```
81
129
82
130
### Manual Step-by-Step Setup
@@ -532,6 +580,24 @@ podman run -d \
532
580
533
581
### Starting and Stopping
534
582
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
+
535
601
``` bash
536
602
# Start all containers in pod
537
603
podman pod start ci-analysis-pod
@@ -685,7 +751,29 @@ sudo setenforce 0
685
751
686
752
## 🧹 Cleanup
687
753
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:
689
777
690
778
``` bash
691
779
# Stop and remove all containers in pod
@@ -725,7 +813,20 @@ podman network prune
725
813
726
814
## 🔄 Updates and Maintenance
727
815
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
729
830
730
831
``` bash
731
832
# Pull latest images
@@ -745,6 +846,22 @@ podman rm ci-analysis-agent ollama
745
846
# (Use your preferred method from above)
746
847
```
747
848
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
+
748
865
### Backup and Restore
749
866
750
867
``` bash
@@ -821,4 +938,56 @@ sudo systemctl enable --now ollama.service
821
938
--tmpfs /tmp:rw,noexec,nosuid,size=2g
822
939
```
823
940
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
+
824
993
This containerized approach provides a clean, isolated environment for running the CI Analysis Agent with excellent portability and reproducibility across different systems.
0 commit comments