Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 toepomakercontroller
.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