doitandbedone / ispyagentdvr-docker

GNU General Public License v3.0
113 stars 43 forks source link

Create a build for ARM64 #134

Closed thewan056 closed 3 years ago

thewan056 commented 3 years ago

Is your feature request related to a problem? Please describe. Doesn't seem to work on AArch64/ARM64? I'm trying to run this in docker on my NAS. Its an Asustor 4002t with an Marvell ARMADA-7020 ARM64 CPU.

Describe the solution you'd like Create a build for arm64

Describe alternatives you've considered

Additional context

doitandbedone commented 3 years ago

Will have to pull the base build and test it. I'll take a look.

On Sun, Jan 10, 2021, 12:10 PM thewan056 notifications@github.com wrote:

Is your feature request related to a problem? Please describe. Doesn't seem to work on AArch64/ARM64? I'm trying to run this in docker on my NAS. Its an Asustor 4002t with an Marvell ARMADA-7020 ARM64 CPU.

Describe the solution you'd like Create a build for arm64

Describe alternatives you've considered

Additional context

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/doitandbedone/ispyagentdvr-docker/issues/134, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORTFNCZOMBEPWFQ5UVP5LTSZICTJANCNFSM4V4V33GQ .

doitandbedone commented 3 years ago

@ispysoftware seems the dependencies for the deb packages are not available for arm, do you recommend any alternatives?

ispysoftware commented 3 years ago

Yeah it's not that simple unfortunately. Needs an arm build of webrtc and opencv and ffmpeg. I can possibly do the first 2 but ffmpeg will be the main problem. There's got to be an ffmpeg 4 shared build for arm out there somewhere...

doitandbedone commented 3 years ago

Thought so. I started looking for some of then as well. Not that common. Microsoft does offer a base image fortunately but until we get the dependencies I'm afraid it won't work.

On Mon, Jan 11, 2021, 6:24 PM sean tearney notifications@github.com wrote:

Yeah it's not that simple unfortunately. Needs an arm build of webrtc and opencv and ffmpeg. I can possibly do the first 2 but ffmpeg will be the main problem. There's got to be an ffmpeg 4 shared build for arm out there somewhere...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/doitandbedone/ispyagentdvr-docker/issues/134#issuecomment-758351130, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORTFNHPCHVNSGTOH3K6S43SZOXG5ANCNFSM4V4V33GQ .

thewan056 commented 3 years ago

Noted. Thought I could run lean by purely using my NAS, but I'll be considering getting one of those mini PCs soon. The built in NVR from Asustor is kinda terrible.

ispysoftware commented 3 years ago

I've got it working on a raspberry pi 4 - which is Arm 32 bit. Should be able to get a 64 bit build done as well. The FFMPEG snap store build seems to work fine. - sudo snap install ffmpeg

doitandbedone commented 3 years ago

Giving it a try.

Edit: What about all the .deb packages? Aren't these also needed besides ffmpeg?

doitandbedone commented 3 years ago

Just noticed snap is not available (easily) in a docker image. Since docker images are usually lightweight versions of the actual OS, some things are left out. I did created a build for arm, should build in a few minutes. You can try the tag arm64. Full command:

docker run -it -p 8090:8090 -p 3478:3478/udp -p 50000-50010:50000-50010/udp \
-v /appdata/ispyagentdvr/config/:/agent/Media/XML/ \
-v /appdata/ispyagentdvr/media/:/agent/Media/WebServerRoot/Media/ \
-v /appdata/ispyagentdvr/commands:/agent/Commands/ \
--name ispyagentdvr doitandbedone/ispyagentdvr:arm64

Do have in mind that it's still missing libjpeg dependency, so not sure what features will be affected exactly but guessing some regarding image captures.

ispysoftware commented 3 years ago

I had it running on the Pi on Raspbian OS, dunno what you need to do with Docker to get that. I think it should work on any 32 bit Arm OS although not sure about it.

It will need the arm 32 build, which is here: https://ispyfiles.azureedge.net/downloads/Agent_ARM32_3_0_8_0.zip .. and the .net core framework for 32 bit arm which is here: https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-aspnetcore-3.1.11-linux-arm32-binaries

ispysoftware commented 3 years ago

..trying to get it to build opencv for aarch 64 now

doitandbedone commented 3 years ago

I would probably recommend to run it directly and bypass Docker as there is some overhead, specially if the system is on low end hardware. For docker, binaries are the best as it would not support complex things such as snap store. The .NET is covered by the docker image built for arm64 tag. FFMPEG (standard) seems to be covered by the vanilla repo but if there's specific libraries needed then we would need to get them. I know you recommend Jonathon's repo which does include some extra stuff.

doitandbedone commented 3 years ago

Hmm... Seems dockerhub has an issue when building the image but you can try building the image from source:

  1. Download https://github.com/doitandbedone/ispyagentdvr-docker/archive/arm64.zip
  2. Unzip content
  3. Open command line:
cd /directory/where/files/are (For example: ~/Downloads/arm64/)
docker build -t  ispy-arm64 .
docker run -it -p 8090:8090 -p 3478:3478/udp -p 50000-50010:50000-50010/udp \
-v /appdata/ispyagentdvr/config/:/agent/Media/XML/ \
-v /appdata/ispyagentdvr/media/:/agent/Media/WebServerRoot/Media/ \
-v /appdata/ispyagentdvr/commands:/agent/Commands/ \
ispy-arm64
doitandbedone commented 3 years ago

Just changed the download location for ARM specific in the image. Noticed you named it ARM32, is there a 64 bit one? All main RBP are 64bit unless you got a Zero or so, which in this case I would really advise against using it for iSpy :P

ispysoftware commented 3 years ago

No not yet, working on it. My pi 4 didn't come with a 64 bit OS and all the available OS's for it are all 32 bit. You have to hunt down a 64 bit OS for it and install it manually.

On Mon, Jan 18, 2021 at 3:12 PM doitandbedone notifications@github.com wrote:

Just changed the download location for ARM specific in the image. Noticed you named it ARM32, is there a 64 bit one? All main RBP are 64bit unless you got a Zero or so, which in this case I would really advise against using it for iSpy :P

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/doitandbedone/ispyagentdvr-docker/issues/134#issuecomment-762036405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGDKXKIGQOIXUOF7RAZBF3S2PNOTANCNFSM4V4V33GQ .

thewan056 commented 3 years ago

I noticed that Asustors App store, called App Central, has FFmpeg build for my NAS, I wonder if that is usable.

https://www.asustor.com/app_central/app_detail?id=814&type=18&model=

Hmm... Seems dockerhub has an issue when building the image but you can try building the image from source:

I tried this and got as far as the 'Connecting Agent'.

doitandbedone commented 3 years ago

Hmm, that means it's agent is running, you are still not able to connect? If so, please post your container logs.

ispysoftware commented 3 years ago

I uploaded an arm64 build earlier its on the website download page

doitandbedone commented 3 years ago

Just added it, thank you! Will be looking on how to automate these as well.

jbolanosg commented 3 years ago

I also am interested in a version en ARM64/V8 version...i can help you with test in this platform...I have a Linux server (SBC - TV Box) with amlogic S905x2 processor and operating system ubuntu 20.04

jbolanosg commented 3 years ago

i downloaded dockerfile for ARM64 i build the image and i already have Agent DVR running in ARM64...i say you later if i find an error o trouble.