Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Remove staticx #83

Merged
merged 2 commits into from
Apr 18, 2023
Merged

Conversation

SebastianSchildt
Copy link
Contributor

I think "size-wise" we can get rid of staticx, and this is one quick shot at it.

Advantages

  • no more weird patchelf issues or incompatibilities with pyintaller
  • one less moving part

Disadvantages

  • To get a small image needed to switch to Alpine (as "from scratch" is not possible after pyinstaller). This leads to longer build times due to GRPC needing to be built for MUSL

The current size on arm64

 % docker images | grep dbc                                         
dbc                                                                              latest                 a0f3a5b42edb   3 minutes ago    39.4MB

I did test, it can start and play logfile to dataroker, I had no way to

  • test amd64 version
  • test whether access ot socketcan (vcan) still works

@@ -31,35 +33,26 @@ ENV PATH="/opt/venv/bin:$PATH"
RUN /opt/venv/bin/python3 -m pip install --upgrade pip \
&& pip3 install --no-cache-dir -r requirements.txt

RUN pip3 install wheel scons && pip3 install pyinstaller patchelf==0.17.0.0 staticx
RUN pip3 install wheel scons && pip3 install pyinstaller
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on our recent problems with pyinstaller (well actually with staticx it seems) I am thinking if we in the long run should handle the dependencies here similar to our requirements* files, i.e. directly or indirectly specify exact version so we can always "rebuild" the same docker container. Maybe not for main/master, but maybe for releases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we add it to dev-dependencies? Or create a seperate "requirements-package.in" or something, generate it and pip-install it as well?

Copy link
Contributor

@erikbosch erikbosch left a comment

Choose a reason for hiding this comment

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

I did the following:

  • Built the container for amd64
  • Run it on my Linux VM towards Databroker, with and without CANplayer running separately.

Both worked, so functionally I am in favor of this PR

Signed-off-by: Sebastian Schildt <sebastian.schildt@de.bosch.com>
Signed-off-by: Sebastian Schildt <sebastian.schildt@de.bosch.com>
@SebastianSchildt SebastianSchildt marked this pull request as ready for review April 18, 2023 07:23
@SebastianSchildt SebastianSchildt merged commit 3517092 into eclipse-kuksa:main Apr 18, 2023
@erikbosch erikbosch deleted the test/docker branch October 31, 2024 13:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants