This repository provides instructions to set up and run the LLM service inside a k8s pod. Follow the steps below to install dependencies, configure the environment, and build the necessary services.
sudo apt update --fix-missing sudo apt install python3.10-venvpython3 -m venv LLM source LLM/bin/activatepip3 install jinja2 pip3 install pyyaml typeguard pip3 install torch torchvision torchaudio pip3 install opencv-python pip3 install -U huggingface_hubmkdir pretrained cd pretrained huggingface-cli download --resume-download --local-dir-use-symlinks False OpenGVLab/InternVL2-8B --local-dir InternVL2-8B cd ..pip3 install einops wheel timm pip3 install flash_attn pip3 install decord pip3 install transformers pip3 install accelerate pip3 install sentencepiece python3 -m pip install -U scikit-imagecd colcon_ws/src git clone https://github.com/Sisqui/LLM_service.git GIT_LFS_SKIP_SMUDGE=1 git clone -b humble-devel https://github.com/Alpaca-zip/ultralytics_ros.git rosdep install -r -y -i --from-paths .python3 -m pip install -r ultralytics_ros/requirements.txt pip3 install empy==3.3.4 pip3 install catkin_pkg lark pip3 install numpy==1.26.4cd .. colcon build --packages-select llm image_pose_pub ultralytics_ros source install/setup.bashOnce all dependencies are installed and ROS2 services are built, you can start using the LLM service within your ROS2 environment. Ensure your virtual environment is activated before running any commands.
# Terminal 1 zenoh-bridge-ros2dds -c zenoh-config-drone.json5 # Terminal 2: ros2 launch image_pose_pub image_pose_launch.py compressed_image_topic:=/summit/summit/oak/rgb/image_raw/compressed raw_image_topic:=/summit/image_raw # Terminal 3: ros2 launch ultralytics_ros tracker.launch.xml debug:=true input_topic:=/summit/image_raw #Terminal 4: ros2 launch llm ros2_service_launch.py #Terminal 5 leakage detection: ros2 launch llm leakage_client_launch.py #Terminal 6 posture detection: ros2 launch llm posture_client_launch.py# Terminal 1: ros2 launch zed_wrapper zed_camera.launch.py # Terminal 2: zenoh-bridge-ros2dds -c zenoh-config-drone.json5ros2 launch llm tf_transform_summit_launch.py