--- title: topic-clustering-global-dashboard app_file: service_periodic.py sdk: gradio sdk_version: 4.43.0 --- ## Build docker ``` docker build -t clustering-dashboard . docker run -d --restart=always --name clustering-dashboard clustering-dashboard ``` ## Deploy TRT ``` scp -r docker/api_trt/Dockerfile ./ docker build -t api-clustering . docker run --gpus 1 --dns 8.8.8.8 -it -p 8633:8633 -v /home/dp04/topic-clustering-global-dashboard:/app -t --name api-clustering api-clustering ``` ### Topic Clustering 1. API clustering port 8633: dùng cho phân cụm NEWS trong các loại báo cáo ( báo cáo nhanh, báo cáo tổng quan, báo cáo template,...) - Command: ``` docker run --gpus all -it --rm -v /home/vietle/topic-clustering:/home/vietle/topic-clustering --name topic_clustering_trt_sb -p 8636:8633 topic-clustering-trt cd /home/vietle/topic-clustering && CUDA_VISIBLE_DEVICES= python main_cache.py ``` - screen: 52097.clustering.trt 2. API clustering social: Phân cụm tin tức social - Command: cd /home/vietle/topic-clustering/ && source docker_venv/bin/activate && uvicorn service_social:app --host 0.0.0.0 --port 8635 - Screen: 37529.clustering.social 3. Phân cụm cho global dashboard: - API: ``` CMD: systemctl status bzo_clustering_api_cpu.service (port 8634) Screen: 21445.clustering.cpu ``` - Consumer: + Phân cụm daily: ``` Command: cd /home/vietle/topic-clustering/ && source docker_venv/bin/activate && OMP_NUM_THREADS=16 CUDA_VISIBLE_DEVICES=-1 python consumer_clustering.py Screen: 16024.bzo.clustering_daily ``` + Phân cụm weekly/monthly: ``` Command: cd /home/vietle/topic-clustering/ && source docker_venv/bin/activate && OMP_NUM_THREADS=16 CUDA_VISIBLE_DEVICES='-1' python consumer_merge_clustering.py Screen: 60767.bzo.clustering_monthly ``` 4. Phân cụm điểm tin: - Command: ``` docker run --gpus all -it --rm -v /home/vietle/topic-clustering:/home/vietle/topic-clustering --name topic_clustering_trt_sb -p 8636:8633 topic-clustering-trt cd /home/vietle/topic-clustering/ && python main_cache_Thien.py ```