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

Dockerize #40

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Dockerize #40

merged 2 commits into from
Sep 23, 2024

Conversation

strodgers
Copy link
Owner

@strodgers strodgers commented Sep 23, 2024

Add a Dockerfile and a compose file to use the application containerized.

The Dockerfile copies the source and installs it using pip. Then a nonrootuser is created for running the application later on.

I am using an entrypoint.sh script so that the container runs epomakercontroller --dev udev when it starts up, then drops down to the nonrootuser passing any cli args along to epomakercontroller.

To get the udev rules to work I had to mount /run/udev in the compose file, which I don't love doing since I quite want the container to be isolated, however I'd prefer to run epomakercontroller as non-root, which requires udev rules, which requires mounting /run/udev.

I am not sure how this would ever work with uploading an image but I'll look into that. I am mostly hoping to use this with users who are experiencing problems so we can rule out environment to some extent.

Use compose to build it:
docker compose build

Then run with some commands using compose run:
docker compose run epomaker-controller <some commands>
eg
docker compose run --rm epomaker-controller send-cpu 56

@strodgers strodgers merged commit d63068a into main Sep 23, 2024
1 check passed
@strodgers
Copy link
Owner Author

NB the container version does not work with the GUI or with uploading images, that will take some more work

strodgers added a commit that referenced this pull request Sep 26, 2024
* Add docker and compose file. Dont need sudo if already root

* Docker image only creates udev rules if it needs to, then just passes args to epomaker-controller within container
strodgers added a commit that referenced this pull request Sep 27, 2024
* feat: Adds key mapping command.

* Update README.md

* Break out some utils, ensure device is closed every time

* Use config files for the GUI keyboard layout (#38)

* Use config files for the GUI keyboard layout

* Update docstring

* Dockerize (#40)

* Add docker and compose file. Dont need sudo if already root

* Docker image only creates udev rules if it needs to, then just passes args to epomaker-controller within container

* Add signal handling to make sure device is closed

* Bump version

* Move delays inside send-cpu/temp. Dont bother with temp if its not set. Put the prints back in

* Better printout when setting key rgb

* Fix bug where daemon test mode can send 100 (must be 0-99)

* Fix linting errors

* Keymaps config file (#39)

* Add config files for keymaps (not finished yet)

* Finish adding config files for keymaps, including a config.py with some helper classes.

* A few more places needed updating to use config files. Add a few more comments here and there

* Delete commented out code

* pkg_resources.path isnt a string, need to open it and get the path str

* unused import

* unused code

* tidy up imports

* Make display_str optional for KeyboardKey

* Missing import after merge with main. Remove unparsed configs in layout json (a)

---------

Co-authored-by: Sam Rodgers <[email protected]>

* Use a config file for some of the controller settings (#42)

* Integrate cskau's keymapping command into main

* Add cli command to print keymap config

* Update docstring

* Keep KeyboardKey frozen

---------

Co-authored-by: Clement Skau <[email protected]>
Co-authored-by: Sam Rodgers <[email protected]>
@strodgers strodgers deleted the dockerize branch March 13, 2025 10:43
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.

1 participant