MrBrax / LiveStreamDVR

An automatic livestream recorder
MIT License
330 stars 25 forks source link

arm support? #385

Closed amgno closed 11 months ago

amgno commented 1 year ago

Please 👉 👈

MrBrax commented 1 year ago

uhh i actually have no idea how to do that, but building it manually should work?

amgno commented 1 year ago

Yeah I thought the same, but It gives me "exec format error" I'll try again, and post the logs if there is any

amgno commented 1 year ago
Attaching to livestreamdvr_web_1
web_1  | exec /usr/local/bin/yarn: exec format error
livestreamdvr_web_1 exited with code 1
MrBrax commented 1 year ago

hmm, shouldn't the correct arch of the node image be downloaded when you build it manually?

amgno commented 1 year ago

I actually don't know, if you suggest anything I can try and tell you right now

MrBrax commented 1 year ago

if there's no solution to docker you should be able to run it bare metal

amgno commented 1 year ago

Yeah but I don't usually run stuff on bare metal, I'd like to keep all things organized under docker. Anyway I'll keep looking onto this and see if I can find any fix

MrBrax commented 1 year ago

what if you edit the dockerfile and change the top to something like arm64v8/node:18-bullseye-slim or whichever your pi's arm version is at

amgno commented 1 year ago
Step 6/31 : COPY --chown=node:node --chmod=775 ./common /usr/local/share/twitchautomator/common
the --chmod option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled
ERROR: Service 'web' failed to build : Build failed
amgno commented 1 year ago

Tried with DOCKER_BUILDKIT=1 docker-compose up --build

 > [ 8/20] RUN cd /usr/local/share/twitchautomator/twitch-chat-dumper     && yarn install --immutable --immutable-cache     && yarn build     && rm -rf node_modules     && rm -rf .yarn/cache     && yarn cache clean --all:                   
#10 0.906 ➤ YN0000: ┌ Resolution step                                           
#10 1.050 ➤ YN0000: └ Completed                                                 
#10 1.076 ➤ YN0000: ┌ Fetch step
#10 1.162 ➤ YN0013: │ esbuild-linux-arm64@npm:0.15.12 can't be found in the cache and will be fetched from the remote registry
#10 1.162 ➤ YN0056: │ esbuild-linux-arm64@npm:0.15.12: Cache entry required but missing for esbuild-linux-arm64@npm:0.15.12
#10 1.165 ➤ YN0013: │ esbuild-windows-arm64@npm:0.15.12 can't be found in the cache and will be fetched from the remote registry
#10 1.165 ➤ YN0056: │ esbuild-windows-arm64@npm:0.15.12: Cache entry required but missing for esbuild-windows-arm64@npm:0.15.12
#10 1.283 ➤ YN0000: └ Completed in 0s 206ms
#10 1.283 ➤ YN0000: Failed with errors in 0s 381ms
------
executor failed running [/bin/sh -c cd /usr/local/share/twitchautomator/twitch-chat-dumper     && yarn install --immutable --immutable-cache     && yarn build     && rm -rf node_modules     && rm -rf .yarn/cache     && yarn cache clean --all]: exit code: 1
ERROR: Service 'web' failed to build : Build failed
MrBrax commented 1 year ago

1669905502969

adding these in all .yarnrc.yml files might help?

amgno commented 1 year ago

I don't have those files, where are they located?

MrBrax commented 1 year ago

in each package directory, like server, client-vue, twitch-chat-dumper, twitch-vod-chat

amgno commented 1 year ago
image

Am I doing something wrong?

amgno commented 1 year ago

Ok found it, I had a typo in the filename

amgno commented 1 year ago

Still having errors

 > [ 8/20] RUN cd /usr/local/share/twitchautomator/twitch-chat-dumper     && yarn install --immutable --immutable-cache     && yarn build     && rm -rf node_modules     && rm -rf .yarn/cache     && yarn cache clean --all:                                                                         
#12 0.767 ➤ YN0000: ┌ Resolution step                                                             
#12 0.895 ➤ YN0000: └ Completed                                                                   
#12 0.922 ➤ YN0000: ┌ Fetch step
#12 1.007 ➤ YN0013: │ esbuild-linux-arm64@npm:0.15.12 can't be found in the cache and will be fetched from the remote registry
#12 1.008 ➤ YN0056: │ esbuild-linux-arm64@npm:0.15.12: Cache entry required but missing for esbuild-linux-arm64@npm:0.15.12
#12 1.010 ➤ YN0013: │ esbuild-windows-arm64@npm:0.15.12 can't be found in the cache and will be fetched from the remote registry
#12 1.010 ➤ YN0056: │ esbuild-windows-arm64@npm:0.15.12: Cache entry required but missing for esbuild-windows-arm64@npm:0.15.12
#12 1.131 ➤ YN0000: └ Completed in 0s 208ms
#12 1.131 ➤ YN0000: Failed with errors in 0s 366ms
------
executor failed running [/bin/sh -c cd /usr/local/share/twitchautomator/twitch-chat-dumper     && yarn install --immutable --immutable-cache     && yarn build     && rm -rf node_modules     && rm -rf .yarn/cache     && yarn cache clean --all]: exit code: 1
ERROR: Service 'web' failed to build : Build failed
MrBrax commented 1 year ago

try running yarn install in those folders too after changing the configs

i'll probably make an arm version after this so it won't be required each time

amgno commented 1 year ago

Ok thanks, then I'm going to wait for a official version from you since I'm not really that good with those kind of stuff

MrBrax commented 1 year ago

i don't really have a way to test if it's working, so i can't really verify if this works

amgno commented 1 year ago

Sorry for the late response, but if you need someone to test it, I can do it for you

MrBrax commented 1 year ago

well, the plan was if you got it working i'll make the necessary changes and push it haha

MrBrax commented 1 year ago

i do have a spare rpi 3b+ at home that i might be able to test on but not certain

Rajpratik71 commented 1 year ago

HI @MrBrax , @heryoff ,

It is do able but

https://github.com/MrBrax/LiveStreamDVR/blob/31a6e3fa23a395db0090ae26ace2f9d6acd8c15f/docker/fetch-tdl.sh#L11

will conflict as x64 binary download is harcoded

MrBrax commented 1 year ago

that one could have a different version i suppose, but i wouldn't recommend encoding any video with it at least

Rajpratik71 commented 1 year ago

yes, there we have to use arm binaries of TwitchDownloader.

Rajpratik71 commented 1 year ago

I wonder, if "TwitchDownloader" is a necessary component/dependency or we can remove it ?

MrBrax commented 1 year ago

it's not necessary, no. downloading chats from vods is only possible with that one now i think

luckiestone commented 1 year ago

I've tested it, and it's doable, after some yarn reinstall and nodejs update.

amgno commented 1 year ago

If anyone comes up with an Docker image, I'll be glad to help testing

luckiestone commented 1 year ago

I've tested on two arm ubuntu machines, and the app works without any issue. Maybe an official modification and push? Here the steps:

  1. Clone the repo
  2. Modify the files https://github.com/MrBrax/LiveStreamDVR/issues/385#issuecomment-1333864948
  3. yarn and node update
  4. docker-compose up --build -d and there's no need to run yarn install in those .yarnrc.yml folders
MrBrax commented 1 year ago

yarn and node update

what did you mean by this? wouldn't yarn update upgrade dependencies?

luckiestone commented 1 year ago

yarn and node update

what did you mean by this? wouldn't yarn update upgrade dependencies?

I have no idea what's the reason, but unless an reinstall of yarn, I was keeping getting this error. It's exactly the same as the one here: https://stackoverflow.com/questions/46013544/yarn-install-command-error-no-such-file-or-directory-install

luckiestone commented 1 year ago

Update: No need to modify all .yarnrc.yml files except the one in submodule twitch-vod-chat, and yarn install is needed to run in each sub folder. After all that, an ARM linux docker version is built.

MrBrax commented 1 year ago

nice, i need to fix issues preventing twitch-vod-chat from upgrading, and i'll try to make an arm published image

MrBrax commented 1 year ago

yarnrc now fixed on dev branch, so everything should probably be compatible with docker now? i made it publish to dockerhub but i have no idea if it actually works

MrBrax commented 1 year ago

ok i finally got it to push to dockerhub, but the build time went from 5 minutes to 2 hours lol

considering it actually built i suppose it should be working?

luckiestone commented 1 year ago

I've already pulled the develop image, and the container looks fine, I'm waiting for a channel going live to see if everything works as expected.

luckiestone commented 1 year ago

Update: ARM support is good now I think, for both docker hub and manual build. No more additional modifications needed now for manual build, git clone and docker-compose and done.