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

ARM binary release #35

Closed
frozenmaple opened this issue Mar 6, 2019 · 146 comments · Fixed by #1261
Closed

ARM binary release #35

frozenmaple opened this issue Mar 6, 2019 · 146 comments · Fixed by #1261
Assignees
Labels
enhancement Some improvement that isn't a feature
Milestone

Comments

@frozenmaple
Copy link

I have a RPi 3B+ module,and i hope code-server will be running within this platform, thank u

@sr229
Copy link
Contributor

sr229 commented Mar 6, 2019

@frozenmaple due to the resource usage of VSCode, no, its not possible unless you use a Memory-optimized version of Electron for Raspberry Pi.

@kylecarbs
Copy link
Member

We'll be reducing the amount of memory code-server uses. It's a decently-high priority for us.

Would running this on a PI just require us to have an ARM target?

@sr229
Copy link
Contributor

sr229 commented Mar 6, 2019

@kylecarbs yep, armhf and arm64.

@kylecarbs
Copy link
Member

Will take a bit as nexe 2.x.x doesn't support arm as a target.

@nol166 nol166 mentioned this issue Mar 7, 2019
@icebob
Copy link
Contributor

icebob commented Mar 7, 2019

@kylecarbs do you insist on using nexe? pkg is a similar project to create executable from Node project with arm support. It's just my two cents.

@kylecarbs
Copy link
Member

kylecarbs commented Mar 7, 2019

Hm that's fair. We've considered using pkg, will consider it again especially for the additional targets.

@nhooyr nhooyr changed the title Will this project support on Raspberry Pi platform? ARM binary release Mar 8, 2019
@nhooyr nhooyr added build-process enhancement Some improvement that isn't a feature and removed build-process labels Mar 8, 2019
@Jakst3r
Copy link

Jakst3r commented Mar 14, 2019

It would be amazing to be able to run this in docker on my Odroid XU4Q & ODROID-N2 when it's released.

@SuperSandro2000
Copy link
Contributor

@Jakst3r are they arm64? If not you can forget it cause build time on qemu arm32 is like 10x and more.

@Jakst3r
Copy link

Jakst3r commented Mar 14, 2019

@SuperSandro2000

Looks like the Odroid XU4Q is out of the question, what do you think about the ODROID-N2?

Odroid XU4Q = 32-bit
Samsung Exynos-5422 : Cortex™-A15 and Cortex™-A7 big.LITTLE processor with 2GByte LPDDR3 RAM

ODROID-N2 = 64-bit
quad-core ARM Cortex-A73 CPU cluster and a dual core Cortex-A53 cluster with a new generation Mali-G52 GPU. 4GByte DDR4 RAM running at 1320Mhz

@sr229
Copy link
Contributor

sr229 commented Mar 14, 2019

@kylecarbs I would like to also note we need to tell V8 explicitly to use Ignition (JITLess) to lower memory requirements for ARM boards (but I believe we should also apply this to x86 as well).

@Codelica
Copy link

Would love to see this also. 👍 A couple notes on pkg though..

  • Currently it only builds to 32bit (ARMv6 and ARMv7). There are no AArch64 targets. It may be possible using your own "base binaries" with --build, but I wouldn't bet my life on it.
  • Currently it's not able to build Linux ARM from MacOS or Windows, regardless of qemu. There seems to be some base package naming bug involved. Building directly on Linux ARM works as expected (which is what we do). I think it would probably build from Linux x86/qemu (or inside a Linux "ARM" container) though, given resources like ld-linux-armhf.so.3 are available.

As much as I'd like to see ARM binaries, it seems like another option would be to just offer "binaries" for x86 (Linux, Mac, Windows), but Docker images to include ARM32 and ARM64 -- where the entrypoint is node rather than a packaged code-server binary.

Really I'd find this project more useful on ARM than x86 for our projects. Would be great to have nice Web IDE access to IoT projects -- similar to how some devices used to bundle Cloud9 back in the day. For now we just mound the FS over SSH and use VS Code. :/ .

@SuperSandro2000 is build time that important? I assume that would just be automated in the end.

@SuperSandro2000
Copy link
Contributor

SuperSandro2000 commented Mar 14, 2019

@Codelica I didn't pay to much attention to the arm builds yesterday and basically build amd64 trough qemu. Derp
So forget my time estimate.

But I encountered another problem while building the image.
Locally I got amd64 buidling like a charm but on travis I get GitHub Api rate limits from that line https://github.com/codercom/code-server/blob/master/build/tasks.ts#L200

The travis job https://travis-ci.org/SuperSandro2000/docker-images/jobs/506429199

And the problem with build times is that I hate using Docker Hub cause it is really slow and travis limits opensource projects to like 50 min of runtime.

@kylecarbs
Copy link
Member

Progress has been made on this with our binary packager nbin.

Should allow us to export for arm very soon!

@kylecarbs kylecarbs added this to the In Progress milestone Mar 26, 2019
@miberecz
Copy link

Any ETA on this? Pi server users would appreciate.

@SuperSandro2000
Copy link
Contributor

@mqmq0 last time I checked it used so much RAM that you would need a pi for this alone.

@sr229
Copy link
Contributor

sr229 commented Mar 30, 2019

@mqmq0 the RAM usage of code-server is not optimized enough for Pis, please be patient as the team are trying their best to deliver this for our venerable Raspberry Pi community.

@kylecarbs kylecarbs unpinned this issue Jan 21, 2020
@deftdawg
Copy link

Another build for folks to try, this was build against buster on arm... it dies with an illegal instruction on my Pi Zero W though. The Pi Zero isn't a great test machine as it's armv6 and has only 512mb ram.

@mirsella, @Toxblh or someone if you can give this a run and let me know if it starts...

@mirsella
Copy link

Another build for folks to try, this was build against buster on arm... it dies with an illegal instruction on my Pi Zero W though. The Pi Zero isn't a great test machine as it's armv6 and has only 512mb ram.

@mirsella, @Toxblh or someone if you can give this a run and let me know if it starts...

thanks, really appreciate your work, but i'm not using buster anymore haha
if nobody can test it, i can flash buster on another unused sdcard and test it on a clean install

@deftdawg
Copy link

I've created a new bug that describes the issue I'm hitting with armv6 build. Essentially it loads and looks like it's going to work but then node mysteriously exits with status 0.

@Toxblh
Copy link

Toxblh commented Jan 24, 2020

@deftdawg relative that #35 (comment)
[Error: ENOENT: no such file or directory, open '/home/deftdawg/code-server/build/code-serverdeftdawg-arm-debian-10-vsc1.41.1-linux-arm-built/out/vs/server/src/node/cli.js'] { small problems 😅

@radokristof
Copy link

@deftdawg Maybe this can work on an RPi 4?
I have tried the first version by you, but it failed somewhere.
Also I had to modify the source to change the port. Can I somehow change the port? Because 8080 is used for me.
Also the newer build you posted, I can't guess what type of file is this :(

@deftdawg
Copy link

Arm v6 now works but must be run with the unofficial build of 12.14.1

I'm still working on a problem with build.ts using too much memory for my little Pi Zero which prevents me from building a self-contained binary.

@radokristof
Copy link

Oh, I understand... but that means that some day even a docker container can be made which will work with armv6?
RAM is not really an issue for me, because I have a Pi 4 4GB version...

@Toxblh
Copy link

Toxblh commented Jan 24, 2020

@deftdawg I can try to build it on my RPi 3B, but I’m not fully understand how to do that

@deftdawg
Copy link

I posted how I setup 12.14.1 on arm6 here

Not sure if building on a Pi3 will work, I have one at home I may fire it up though I think making build.ts not buffer all 220MB of binary data in memory before writing it is the best way to fix the last issue.

@mirsella
Copy link

mirsella commented Jan 25, 2020

Also I had to modify the source to change the port. Can I somehow change the port? Because 8080 is used for me.

@radokristof code-server --port 1234

@radokristof
Copy link

@mirsella I think that can't be used on this tweaked version of code-server provided by @deftdawg
Basically the runnable file won't pass the parameters...

@deftdawg
Copy link

Open the shell script and append $* to the node line near the bottom and it will pass the parameters

@deftdawg
Copy link

New build; this was tested on the Raspberry Pi Zero (armv6), and Pi2 (armv7)... it requires nodejs-12.14.1-arm6 (script installs it in home dir) and raspbian or debian 9 or higher. Debug logging is off and $* has been added to the start script.

I could not build the standalone binary with the Pi2, it dies at the same spot after attempting to allocate more than the 1GB of ram on the Pi2.

@Toxblh
Copy link

Toxblh commented Feb 13, 2020

@deftdawg Your build is work without some bugs on RPi3. Awesome.

@nhooyr
Copy link
Contributor

nhooyr commented Feb 13, 2020

@deftdawg That's awesome. FYI for anyone following the open issue tracking this is at #1337

@Toxblh
Copy link

Toxblh commented Feb 13, 2020

If you would like to try I wrap it to docker
docker run -p 8888:8080 -v /home/pi:/home/pi toxblh/code-server-rpi
Not ideal yet, but basically work without terminal

Just need to fix Error loading shared library ld-linux-armhf.so.3 and will work

@TechLevelZero
Copy link

for people wanting to running on the Pi 3 and above you can get a 64bit userspace in buster via chroot

sudo apt install -y debootstrap schroot

put this config in /etc/schroot/chroot.d/pi64

[pi64]
users=pi
personality=linux
description=V3D arm64 for buster
type=directory
directory=/srv/chroot/pi64
profile=desktop
root-groups=root
preserve-environment=true

sudo debootstrap --arch arm64 buster /srv/chroot/pi64

then run sudo schroot -c pi64 and now your in a 64bit userspace. you will need to reinstall apps again as this user E.G wget, curl, node but after that you can run the latest release (2.1698) of coder

@v0idp
Copy link

v0idp commented Feb 17, 2020

I just need 32bit arm docker image. will 32bit images not be supported ?

@brandosha
Copy link

the toxblh/code-server-rpi docker container seems to be working fine except I am unable to set the password or use https. I'm a noob at docker though so maybe I just don't know what I'm doing.

@Toxblh
Copy link

Toxblh commented Feb 18, 2020

@brandosha I disable it just for the show its work)) But yes it's work, I can to recreate it with ARG params

@v0idp
Copy link

v0idp commented Feb 19, 2020

@brandosha I disable it just for the show its work)) But yes it's work, I can to recreate it with ARG params

what does your docker run command look like ?

@realmayus
Copy link

@deftdawg How can I install that new build on my RPi? There is no script, just the packages extensions, node_modules, out and the files package.json and product.json. npm run start doesn‘t work either.

@awahlig
Copy link

awahlig commented Mar 1, 2020

@deftdawg How can I install that new build on my RPi? There is no script, just the packages extensions, node_modules, out and the files package.json and product.json. npm run start doesn‘t work either.

Back out from that directory. There's a script called "cs-on-pi0w.sh" outside of it that you have to run.

So far this build is working fine for me on Pi 4.

@bpmct
Copy link
Member

bpmct commented Mar 13, 2020

@deftdawg Tried to find your build via http://69.195.146.38/code-server/cs-arm32.tar.bz2 and got a 404.

I tried looking through the comments and couldn't find any other builds. Am I missing anything? I have a Raspberry Pi 4B

@deftdawg
Copy link

@bpmct see "new build" link in this post #35 (comment)

@nhooyr
Copy link
Contributor

nhooyr commented May 4, 2020

Hey guys update at #1337 (comment)

yarn global add @coder/code-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.