Open MarcScott opened 5 years ago
start_dispynode.sh
bash script as follows
#!/bin/sh -e
sleep 30
_IP=$(hostname -I)
printf "My IP address is %s\n" "$_IP"
dispynode.py -i $_IP --daemon
chmod +x start_displaynode.sh
@reboot sudo /home/pi/start_dispynode.sh
main
function for when the JobCluster
is created
import dispy, random, socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
cluster = dispy.JobCluster(compute,ip_addr=s.getsockname()[0], nodes='192.168.1.*')
Another few additions:
#!/bin/sh -e
sleep 30
_IP=$(hostname -I)
printf "My IP address is %s\n" "$_IP"
dispynode.py -i $_IP -d --daemon
-d to enable debugging
import dispy, random, socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
cluster = dispy.JobCluster(compute,ip_addr=s.getsockname()[0], nodes='192.168.1.*', loglevel=dispy.logger.DEBUG)
loglevel=dispy.logger.DEBUG to update the log level.
This was very helpful as I worked through some issues with the older project site instructions.
URL: /en/projects/build-an-octapi/5 This doesn't work with the latest version of Raspbian (July 2019). It seems dispy and pycos only work really with Python2.7 or Python3.1. The latest Raspbian comes with Python3.7. From here ... https://github.com/pgiri/dispy I switched to using Python2.7 and I don't get the errors I was getting before, but it still doesn't work. I wondered if you had any more information? I'm trying to get this running for my daughter's school project. Appreciate any help if you've gone through this already. (dan.verdin@gmail.com)