-
Notifications
You must be signed in to change notification settings - Fork 345
Changes to theia-full-docker to run on arm64 #471
base: master
Are you sure you want to change the base?
Conversation
theia-full-docker/Dockerfile
Outdated
g++-multilib \ | ||
gdb && \ | ||
# depending on architecture install form public LLVM PPA (Verison 13) or distirbution (Version 11) | ||
ARG LLVM=11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would probably still not want to touch this value, and only set it in the arm64 architecture only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I have changed the default to 13 and only downgrade it if you build the image on arm64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. If we go with one unified multi-arch image, I think we should proceed as per above when necessary. This way we maintain bleeding-edge features for the main arch, but permit other ones to evolve at their own pace and still work in the meantime, maybe with slightly reduced feature-set.
@dm4tze have you considered starting with one of the more modest images, that would be easier to handle? Like |
What I would love is to have an Electron-based Theia app package that works on a |
Signed-off-by: dm4tze <[email protected]>
Signed-off-by: dm4tze <[email protected]>
Co-authored-by: Vincent Fugnitto <[email protected]> Signed-off-by: dm4tze <[email protected]>
Signed-off-by: dm4tze <[email protected]>
The idea was, first porting the full image then it should be easy to adjust the other images. At my rpi4 as backend it works without any performance issue. But I have to say, that I use a SSD as storage.
I don't have a rpi with installed GUI at the moment. That's why I'm using theia :) |
There is something we're working-on that might be of interest to you. There is not that much info in the issue, but in short we're going to make available a browser app backend, in an easily packaged form. I hope the way we do it can work on raspberry pi and such, too. TL;DR the browser Theia app without Docker. |
This contribution has been automatically marked as stale due to inactivity, and it will be closed if no further activity occurs. Thank you for contributing to Theia! |
@dm4tze Sorry - this PR fell between the cracks for a while. I'm interested in trying it on my own raspberry pi 4. Can you give a bit of details about how one goes about setting-up the necessary environment (high-level steps)? I'm ok installing a new system from scratch on a new micro-sd card, if need be. I suggest adding the info in the PR description. |
&& rm packages-microsoft-prod.deb \ | ||
&& apt-get update \ | ||
&& apt-get install -y dotnet-sdk-$DOTNET_VERSION | ||
RUN DOTNET_ARCH= && dpkgArch="$(dpkg --print-architecture)" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might end-up missing some required packages, that would be marked as a dependency of the Debian package, and installed along.
Maybe better to keep installing with a Debian package for the main arch and have a different handling for arm64?
|
||
ENV DART_SDK /usr/lib/dart | ||
|
||
RUN DART_ARCH= && dpkgArch="$(dpkg --print-architecture)" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially same issue for Dart. Additional we're removing several Debian packages, that used to be installed. I do not know enough about Dart to know if we'll be missing something at runtime.
At least until we figure this out, I suggest making this change only for arm64
DOTNET and DART are the two that look suspicious to me ATM. We might need to supplement the pre-built binaries with OS--level dependencies that are expected to be present. Until we figure these out, I would be ok to keep the main architecture as-is for these languages, and having a custom setup for arm64. If I understand correctly, GitHub workflows support arm64, to it may be possible to add that flavor of the full image to CI, by-passing the need to build on one's own board. |
@dm4tze I wanted to mention that it's highly recommended to somehow secure access to your container and its Theia app. You can use our "https" example image as inspiration: https://github.com/theia-ide/theia-apps/tree/master/theia-https-docker . Without something like this, the Theia app's file-system API (among other things) would be accessible from your LAN and become a potential "access point" e.g. for exploits that can breach your LAN, such as those that use DNS rebinding. |
Hello theia-ide team,
I've made some changes to your theia-full-docker Dockerfile to get it running on an arm64 machine (Raspberry PI4 #411 #130).
Since some of these changes will affect builds for other architectures I want to discuss my solution with you.
If we come to a conclusion I will adjust the Dockerfile to build on the other supported architectures too.
Following changes have been made:
Which of these changes are problematic? Is there a way to test all these changes to see if everything is working as expected?