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: compose, readme, and dockerfile for qt gui #30

Merged
merged 5 commits into from
Jan 11, 2024
Merged

Conversation

maffettone
Copy link
Contributor

@maffettone maffettone commented Dec 11, 2023

Adds the qtgui for the Queue Server from Bluesky widgets as an independent container.

Description

Adds the image, docker compose, updated readme directions. Depends on jozo/pyqt5.

Motivation and Context

People wanted better documentation around the gui, and having a quick container to spin up and test is the first step there. This should also facilitate better local testing.

Summary of Changes for Release Notes

Add container for Bluesky Widgets QTGui (queue-monitor) for Bluesky Adaptive

Added

  • New docker image and entry point

Changed

  • docker compose file
  • README

How Has This Been Tested?

Tested on a Mac which should be the hardest way to do this.

  • Follow readme.
  • Then docker compose up.
  • Use GUI to connect, then open environment.
  • Use GUI to add some agent driven naps to queue
  • Start the queue

Screenshot 2023-12-11 at 10 36 53 AM

@maffettone
Copy link
Contributor Author

@padraic-shafer You can expect all tests to fail in the GHA. It is on the TODOs to fix up this test suite following the same paradigm as the containers used in local testing.

Copy link
Contributor

@padraic-shafer padraic-shafer left a comment

Choose a reason for hiding this comment

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

I've posted a few questions and suggestions.

docker/README.md Show resolved Hide resolved
docker/README.md Show resolved Hide resolved
docker/README.md Outdated Show resolved Hide resolved
docker/README.md Outdated
cd ../
export LOCAL_DISPLAY_IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider handing either Linux or MacOS here

Suggested change
export LOCAL_DISPLAY_IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
export LOCAL_DISPLAY_IP=$([[ ! -z "${DISPLAY}" ]] && echo "${DISPLAY}" || ifconfig en0 | grep inet | awk '$1=="inet" {print $2":0"}')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This took a bit more wrangling because OSX has a DISPLAY variable that is not the IP needed for X11 forwarding from the container. So I broke this into a bash script that checks for Darwin, etc and operates accordingly.

docker/README.md Outdated Show resolved Hide resolved
docker/docker-compose.yml Outdated Show resolved Hide resolved
docker/queue-monitor/entrypoint.sh Outdated Show resolved Hide resolved
maffettone and others added 2 commits January 9, 2024 11:36
Co-authored-by: Padraic Shafer <[email protected]>
- add: bash file to set local display conditionally on mac/linux
- Move entrypoint command to CMD
- Update README
@maffettone
Copy link
Contributor Author

@padraic-shafer I made some updates in 8aa1cc2 to fix the security issue of xhost and be more deliberate with the DISPLAY variables between Mac/linux. Take another look when you get a chance!

Copy link
Contributor

@padraic-shafer padraic-shafer left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes. The docs and container look really useful.

docker/queue-monitor/local_display.sh Outdated Show resolved Hide resolved
docker/README.md Show resolved Hide resolved
@maffettone maffettone merged commit f21d6ff into main Jan 11, 2024
8 of 16 checks passed
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

Successfully merging this pull request may close these issues.

2 participants