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

Add desktop UI and clone Peggy project, set to user. #12

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

icarito
Copy link
Member

@icarito icarito commented Aug 10, 2018

This adds to the internal script the package for a desktop environment and then clones Peggy repository into /home/publiclab/Peggy:

https://github.com/MargaretAN9/Peggy - Computer Vision enhancements for Raspberry Pi based Public Lab Science Projects


Download instructions

Generating the image will take a few minutes. Once the image is prepared, and if it succeeded, you'll see a green checkmark at the bottom of the pull request. To download the image:

  1. click the green checkmark; you'll go to a page at a URL like https://gitlab.com/publiclab/image-builder-rpi/pipelines/########/builds
  2. On this page, click the Jobs tab, next to Pipeline
  3. Click the green Passed button
  4. Click Download in the right-hand sidebar
  5. Unzip the artifacts.zip file, and also the hypriotos-rpi-camera_web.img.zip within it
  6. Use a program like https://etcher.io/ to flash it to an SD card

You'll also be able to read the output of the image generation in this window.

We hope to create a bot to report back the completed image URL in each pull request. If you can help create such a bot, please contact us at:

#16

Thanks!

@@ -68,5 +68,8 @@ runcmd:
# Pickup the hostname changes
- 'systemctl restart avahi-daemon'

# Give ownership of scripts
- 'chown publiclab.publiclab /home/publiclab/Peggy -R'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, will this often be necessary? Does chroot-script run as root, and could this in theory be put there? Thinking about how to learn from this example. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I predict it is necessary because at the time of git cloning (image build time), it is running as root.
Commands in user-data run on first boot (including user creation!). This is my understanding from seeing cloud-init documentation.

We'll see!

@icarito
Copy link
Member Author

icarito commented Aug 11, 2018

We seem to be running into some sort of file size limit with Gitlab. I'll make a fallback with our own Jenkins instance.

@icarito icarito added jenkins and removed jenkins labels Aug 11, 2018
@icarito
Copy link
Member Author

icarito commented Aug 11, 2018

Trying to trigger Jenkins, please excuse the noise.

@icarito icarito closed this Aug 11, 2018
@icarito icarito reopened this Aug 11, 2018
@icarito
Copy link
Member Author

icarito commented Aug 11, 2018

Jenkins pls build!

@icarito
Copy link
Member Author

icarito commented Aug 15, 2018

Hi! I managed to get Gitlab to build this image!
https://gitlab.com/publiclab/image-builder-rpi/-/jobs/89397055/artifacts/browse

It provides:

  • Basic desktop environment
  • Pre-cloned Peggy repository

It lacks:

  • Python libraries required to run Peggy

Please try it and confirm the process works! Thanks for your hard work!

@icarito
Copy link
Member Author

icarito commented Aug 15, 2018

It also provides the captive portal and wifi hotspot of course.

@jywarren
Copy link
Member

@MargaretAN9 want to try this out and see if it boots your code?

@MargaretAN9
Copy link

I was able to unzip and create a img file. I used WinDiskImager to create a microSD. The Raspberry Pi with micro sd does boot up but I can't get pass the password screen. What is the user name and password?

Also note two errors but not sure if they mean anything:
-Failed to start network interface
-Failed to start disable wifi if country not set

@MargaretAN9
Copy link

Password listed on readme does not work https://github.com/publiclab/image-builder-rpi/blob/master/README.md

@icarito
Copy link
Member Author

icarito commented Aug 18, 2018

Hi @MargaretAN9 Thanks for your tests!
I'm glad you could find the password in the README file. There should be a user called publiclab with password publiclab. Also, there should be a WIFI network created called 00PiCamera with password publiclab.
I don't have a HDMI monitor or TV to try it out directly.
When we figure out the login issue, we need to figure out what requirements your scripts have so that we can preinstall them. That is, figure out what Python packages need to be preinstalled from the Raspbian repositories (or if you require, packages from python package index PIP)

@MargaretAN9
Copy link

@icarito Thx I tried username:publiclab and password: publiclab. The system accepts the enter, turns the screen black (about 2 sec) and then redisplays request for password....

@icarito
Copy link
Member Author

icarito commented Aug 19, 2018

Thanks @MargaretAN9 for your feedback! That means I've missed packages necessary for the graphical session. You would be able to login if you switch to the text console with Ctrl-Alt-F1 or Ctrl-Alt-F2.
Once logged in with publiclab user, in text mode, you could try to start the graphical session with startx. Errors should tell us what is missing. We need to make a list of packages missing and put them in chroot-script.sh. I wonder if we will include a graphical session or we will try to use your scripts as a streaming service. Have a good Sunday!

@MargaretAN9
Copy link

MargaretAN9 commented Aug 19, 2018

@icarito
-Ctrl-Alt-F1with password lets me in , I can see Peggy as the only directory when I $dir
-running startx says -bash:startx command not found
--Also changed dir to home and same response
-Does this run Rasbian? https://www.raspberrypi.org/downloads/raspbian/
-Have not tried streaming, thought it may not be a good fit for big data files or videos

Thx for loading my programs!

@MargaretAN9
Copy link

@jywarren,@icarito

  • Thanks for the opportunity to work for Public Lab this summer and the kind words in the evaluation!

  • I am not sure how to move forward on the Raspberry Pi img file. I don’t have much experience with linux commands so I am not sure what to do. I am not sure whether my problems are caused by my monitor/Raspberry PI 3B+ setup or something else.

  • One suggestion is to load an img file on a 16GB microsd that includes both image downloading (python) and streaming options(js) and sell it at the Public Lab store. This might be the easiest option to install and permit the greatest flexibility.
    -I am also packing up the different camera set-ups I used over the summer. If anyone would like to use any of the test objects, 3B+/ picamera, or Elodea plants please let me know and I will figure out how to mail.

@jywarren
Copy link
Member

load an img file on a 16GB microsd that includes both image downloading (python) and streaming options(js) and sell it at the Public Lab store

This would be great. I'd love to work towards this together if possible!

Regarding the camera set ups, you're free to hold on to those, @MargaretAN9 -- you certainly earned them!

@jywarren jywarren changed the title Add desktop and clone Peggy project, set to user. Add desktop UI and clone Peggy project, set to user. Nov 1, 2018
@jywarren jywarren mentioned this pull request Nov 1, 2018
@jywarren
Copy link
Member

Oh cool, this is booting now? 👍

@jywarren jywarren changed the base branch from master to main June 24, 2020 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants