Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project site feedback #11

Open
MarcScott opened this issue Jul 22, 2019 · 2 comments
Open

project site feedback #11

MarcScott opened this issue Jul 22, 2019 · 2 comments

Comments

@MarcScott
Copy link
Contributor

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. ([email protected])

@MarcScott
Copy link
Contributor Author

On Servers

  1. rc.local not starting node on server
  2. Create 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
  1. Make executable chmod +x start_displaynode.sh
  2. Run using cron @reboot sudo /home/pi/start_dispynode.sh

On client

  1. compute.py needs to know it's own IP address.
  2. Add the following into 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.*')

@jwest75674
Copy link

Another few additions:

On Servers

   #!/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

On client

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants