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

carsim: Remove staticx and switch PyInstaller to directory more #2

Open
mikehaller opened this issue Jun 16, 2023 · 0 comments
Open
Assignees

Comments

@mikehaller
Copy link
Contributor

Using staticx and PyInstaller "file" mode creates a fat-binary which needs to be uncompressed at runtime.

For containerized applications which are supposed to run in read-only mode, this is bad behaviour and unnecessary:

  • staticx unpacks to /tmp, which is not a real tmpfs. Hence, the container runtime creates a persistent volume/overlay
  • on shutdown of the container, staticx runs a clean up script to delete the tmp files. however, in automotive embedded systems, sress testing includes hard powering-off the devices, which leads to garbage piling up (leftover overlay volumes).
  • a good citizen app would be run in read-only mode, so that no persistent volumes are created at runtime. that requires /tmp to be mounted to a real tmpfs - or even better, the application does not create temp files at all.
  • for an application like carsim, which has no persistence requirements, as the states are kept in the Kuksa Databroker, the container should run in read-only mode.

Tasks:

  • Remove staticx from the build in the Dockerfile
  • Change PyInstaller to directory mode
  • Test the container and functionality with docker run ... --read-only ...
@vasilvas99 vasilvas99 self-assigned this Oct 26, 2023
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