Your Raspberry Pi’s IP Address May Not Be Visible or There May Be a Connection Issue. You can follow the steps below to verify the connection and try again:
-
Restarting the Raspberry Pi
• Restart your Raspberry Pi and make sure it is connected to your Mac via an Ethernet cable.
-
Checking the IP Address Again
• Run the following command in the terminal again to check connected devices:
arp -a
-
mDNS Connecting Using
• Your Raspberry Pi may also be accessible via station1.local. Try the following command:
ssh pi@station1.local
-
Manually Finding the IP Address
• If you still cannot find the IP address, run the following command on your Raspberry Pi to retrieve its IP address:
hostname -I
This Command Will Display the IP Address of Your Raspberry Pi on the Network
-
Connecting via IP Address
• Once you have retrieved the IP address, use the following command in the Mac Terminal to connect via SSH:
ssh pi@[bulduğunuz_ip_adresi]
If these steps do not resolve the issue, there might be another connection problem. In that case, you can check the cable connection and network settings again or try a different method (such as connecting via Wi-Fi). Feel free to reach out if you need further assistance.
sudo apt-get update --allow-releaseinfo-change
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -f
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 lsb-release software-properties-common
sudo add-apt-repository --remove ppa:webupd8team/atom
sudo apt-get upgrade
sudo apt-get update --allow-releaseinfo-change
sudo rm /etc/apt/sources.list.d/atom.list
sudo rm /etc/apt/sources.list.d/atom.list.save
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 lsb-release software-properties-common
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
lsb-release \
software-properties-common
curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo apt-key add -
sudo nano /etc/apt/sources.list
Dosyanın sonuna aşağıdaki satırı ekleyin:
deb [arch=armhf] https://mirrors.aliyun.com/docker-ce/linux/raspbian buster stable
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/raspbian/gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 lsb-release software-properties-common
sudo nano /etc/resolv.conf
Add the following lines to the file:
Google DNS Servers nameserver 8.8.8.8 nameserver 8.8.4.4
Cloudflare DNS nameserver 1.1.1.1 nameserver 1.0.0.1
After changing the DNS settings, update the package list and try reinstalling any missing packages:
sudo apt-get update
sudo apt-get install docker-ce
https://itsfoss.com/raspberry-pi-ollama-ai-setup/
curl -fsSL https://ollama.com/install.sh | sh
ollama run tinyllama
pip uninstall ray
pip show ray
pip show ray llama-index-llms-ollama
sudo apt install python3.12-venv
python3 -m venv .venv
source .venv/bin/activate
pip install ray==2.34.0
ifconfig
ray start --head --port=6379
Local node IP: 127.0.0.1
--------------------
Ray runtime started.
--------------------
Next steps
To connect to this Ray cluster:
import ray
ray.init()
To terminate the Ray runtime, run
ray stop
To view the status of the cluster, use
ray status
You can find your IP address under the inet line of the en0 interface.
ray start --address='192.168.1.100:6379'
ray start --address='MAC_IP_ADDRESS:6379'
ray start --head --node-ip-address=192.168.0.4 --port=6379
echo "Your input text here" | python distributed_tinyllama.py
ray stop
ray start --head --port=6379
ray start --address='192.168.0.4:6379'
hostname
ray start --address='hostname:6379'
ray start --head --port=6379 --log-to-driver
ray start --address='192.168.0.4:6379' --log-to-driver
-
Open the Multipass GUI and go to the “Settings” section. Under “Virtualization”, set the “Bridged network” option to en0 (or your active network interface).
-
Creating a New Ubuntu VM
multipass launch --network en0 --name my-ubuntu-vm
- Check the IP Addresses.
multipass list
- Start the Ray Worker Node on the Ubuntu VM.
multipass shell my-ubuntu-vm
multipass shell incisive-poodle
- On the Virtual Machine:
sudo apt update
sudo apt install python3-pip
pip3 install ray
ray start --address='MAC_IP_ADDRESS:6379'
python --version
ray --version
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.10 python3.10-venv python3.10-dev
python3.10 -m venv .venv
source .venv/bin/activate
pip install ray==2.32.0
deactivate
Ray: 2.32.0 Python: 3.10.14
ray stop
ray start --head --node-ip-address=192.168.0.4 --port=6379
ray start --address='192.168.0.4:6379'
pip install -U "ray[default]"
- Starting the Ray Dashboard
ray start --head --node-ip-address=192.168.0.4 --port=6379 --dashboard-host 0.0.0.0
- Accessing the Dashboard
http://192.168.0.4:8265
- Ensure the Ray Dashboard is Running
ray stop
ray start --head --node-ip-address=192.168.0.4 --port=6379 --dashboard-host 0.0.0.0
- Check the Dashboard Port and IP Address
ray start --head --node-ip-address=192.168.0.4 --port=6379 --dashboard-host 0.0.0.0 --dashboard-port 8888
- In this case, you should be able to access the Dashboard at the following URL:
http://192.168.0.4:8888
- Check Firewall and Network Settings Ensure that the firewall settings on your Mac are not blocking access to the Dashboard. Also, verify that your Mac and Ubuntu virtual machine are on the same network and can communicate with each other.
- Check the Status of the Ray Dashboard Use Ray’s status commands to check if the Ray Dashboard is running and on which port:
ray status
- Manually Starting the Ray Dashboard Try starting the Ray Dashboard manually:
- Start the Ray Head Node (without the Dashboard):
ray stop
ray start --head --node-ip-address=192.168.0.4 --port=6379 --include-dashboard=false
- Start the Dashboard in a separate terminal window:
ray dashboard --port 8265
ray dashboard http://192.168.0.4:8265
- Checking Ray Dashboard Logs Check the logs to understand why the Dashboard is not starting. You can find Ray log files in the Ray log directory:
ls /tmp/ray/session_latest/logs/
The script will only be located on your Mac and executed from there. Here are the full steps for running the distributed script:
- Starting the Ray Cluster
- Start the Ray Worker Node on the Ubuntu Virtual Machine
ray stop
ray start --head --node-ip-address=192.168.0.4 --port=6379 --dashboard-host 0.0.0.0
ray start --head --node-ip-address=192.168.0.4 --port=6379 --dashboard-host 0.0.0.0 --dashboard-port 8265
- Start the Ray Worker Node on the Ubuntu Virtual Machine
ray start --address='192.168.0.4:6379'
- Creating and Running the Distributed Python Script
- Run the distributed_tinyllama.py script on your Mac.
pip install git+/~https://github.com/ollama/ollama-python.git
pip install llama-index-llms-ollama
pip install llama-index qdrant_client torch transformers
pip install llama_index
- Executing the Script
- Run the script and monitor the execution.
echo "What is the use case of div tag in html?" | python distributed_tinyllama.py
- Ray Dashboard and Monitoring
- Use the Ray Dashboard to track the execution and performance.
http://192.168.0.4:8265