ERPNext on a Raspberry Pi 3 with Debian 9

Ahh, the reason the arm64 build takes so long is because either Python 3.7 or 3.9 are being used.
And pandas 1.1.5 doesn’t have a wheel for arm64 in python 3.9, only 3.8.
Changing to 1.2.5 knocks 23 minutes off the build time.

I wonder how it performs when ERPNext/Frappe runs the crons.

I’m not a super heavy user, but it seems to run fine. I also run it off an SSD, not the SDCard.
I tried scheduling everything I could and running as many reports as I could, and it chugged along just fine.

Great then… because from the forum we can see some people posted about their server running out of resources and halt. And they do have big spec servers.

earlier versions of pandas and redis has memory leaks, so that doesn’t surprise me, and Python 3.7 was full of 'em. That was the big selling point of 3.10 is that they closed the loop on a large amount of memory leaks.

Hey prakhar!
I pulled your erpnext arm64 latest images from hub so i dont have to build it but failed with installing it with frappe-docker installation compose file through i modified it to point out to your image and application version but after docker-compose up -d it creates all container and stuck at created state only traefik and socket.io container showing started state is it normal ? I leave it to 20-25 minutes but nothing changed to running

Can you tell me is it possible to use your image or i have to build my own ?
If yes then can you guide me or give me your docker-compose file

Hey Saiyam,
I don’t really maintain that repository or those images. I have made some temporary changes to the compose files. Try following the official deployment guides with my forked repository -

https://github.com/Prakhar225/frappe_docker

Try it out. If it works, I can guide you through the process of building the images so you can maintain your own images. If it doesn’t work, let me know and I’ll try to help you out.

@Prakhar225 Ohh i show that those images updated 10 days ago so i thought you are working on it ok i will try it out and i am interested in running this server on my arm64 device for long run so i will proceed with building if i stuck with these images

@Prakhar225 building arm64 images out of official repo is possible. At this moment it is taking lot of time on GitHub actions to build arm64 images.

here’s the PR/discussion:

https://github.com/frappe/frappe_docker/pull/733

bench images for development will be available soon.

How much time?

I have list of arm image build weekly on github ci.
We use ubuntu then chroot into arch arm using qemu.

It does take time to prepare the whole arch arm rootfs then build images.

It would be so much better to have native build for arm64.

If you want I can help with an arm64 device running 24/7 which can be connected as git runner and you can build docker images on it. I have some of my devices connected to gitlab ci runner same can be done with github.

Let me know if that will help.

last time I checked it took around 2hrs

1 Like

And how time does it take for amd64 images ob amd64 host?
If you want we can try to build arm64 image on arm64 host once to compare the time.

I haven’t tried on arm54 host, i only tried it through buildx

@fkardame @revant_one i took 16-18 min to build all 3 images on my arm64 device

I manually build all images
Can you share me any script to build easy

did you use docker buildx bake? you can define variables in hcl file and it results into 1 command for build. docker buildx bake --load

@revant_one Yes i tried before when doing it manually but I was getting error


~/frappe_docker $ sudo docker buildx bake --load
[+] Building 2.5s (17/17) FINISHED
 => [assets-builder internal] load build definition from Dockerfile    0.1s
 => => transferring dockerfile: 101B                                   0.0s
 => [frappe-nginx internal] load build definition from Dockerfile      0.0s
 => => transferring dockerfile: 101B                                   0.0s
 => [frappe-worker internal] load build definition from Dockerfile     0.0s
 => => transferring dockerfile: 101B                                   0.0s
 => [frappe-socketio internal] load build definition from Dockerfile   0.0s
 => => transferring dockerfile: 101B                                   0.0s
 => [erpnext-worker internal] load build definition from Dockerfile    0.0s
 => => transferring dockerfile: 101B                                   0.0s
 => [erpnext-nginx internal] load build definition from Dockerfile     0.0s
 => => transferring dockerfile: 101B                                   0.0s
 => [assets-builder internal] load .dockerignore                       0.0s
 => => transferring context: 2B                                        0.0s
 => [frappe-nginx internal] load .dockerignore                         0.0s
 => => transferring context: 2B                                        0.0s
 => [frappe-worker internal] load .dockerignore                        0.0s
 => => transferring context: 2B                                        0.0s
 => [frappe-socketio internal] load .dockerignore                      0.0s
 => => transferring context: 2B                                        0.0s
 => [erpnext-worker internal] load .dockerignore                       0.0s
 => => transferring context: 2B                                        0.0s
 => [erpnext-nginx internal] load .dockerignore                        0.0s
 => => transferring context: 2B                                        0.0s
 => ERROR [frappe-nginx internal] load metadata for docker.io/nginxin  2.3s
 => ERROR [assets-builder internal] load metadata for docker.io/libra  2.3s
 => ERROR [frappe-nginx internal] load metadata for docker.io/alpine/  2.3s
 => ERROR [frappe-socketio internal] load metadata for docker.io/libr  2.2s
 => ERROR [erpnext-worker] resolve image config for docker.io/docker/  2.2s
------
 > [frappe-nginx internal] load metadata for docker.io/nginxinc/nginx-unprivileged:1.21.6-alpine:
------
------
 > [assets-builder internal] load metadata for docker.io/library/node:14-bullseye-slim:
------
------
 > [frappe-nginx internal] load metadata for docker.io/alpine/git:latest:
------
------
 > [frappe-socketio internal] load metadata for docker.io/library/node:17-alpine:
------
------
 > [erpnext-worker] resolve image config for docker.io/docker/dockerfile:1.3:
------
error: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Aalpine%2Fgit%3Apull&service=registry.docker.io": dial tcp: lookup auth.docker.io on [::1]:53: read udp [::1]:48915->[::1]:53: read: connection refused

`

Blockquote

`

I didn’t get any code regarding docker.io in file through

And also while building socketio docker image I am getting npm UACSESS error
I have to comment out " USER frappe " line to successfully build itPreformatted text

Why am I getting this error ?

=> CACHED [frappe-socketio stage-1 2/8] RUN addgroup -  0.0s
 => CACHED [frappe-socketio stage-1 3/8] WORKDIR /home/  0.0s
 => CACHED [frappe-socketio stage-1 4/8] RUN mkdir -p s  0.0s
 => CACHED [frappe-socketio builder 2/2] RUN git clone   0.0s
 => CACHED [frappe-socketio stage-1 5/8] COPY --from=bu  0.0s
 => CACHED [frappe-socketio stage-1 6/8] COPY package.j  0.0s
 => ERROR [frappe-socketio stage-1 7/8] RUN cd apps/fra  2.4s
 => CACHED [frappe-worker] docker-image://docker.io/doc  0.0s
 => CACHED [erpnext-nginx assets_builder 1/6] FROM dock  0.0s
 => [assets-builder internal] load build context         0.0s
 => => transferring context: 105B                        0.0s
 => CANCELED [assets-builder assets_builder 2/6] RUN ap  2.5s
 => [frappe-nginx internal] load build context           0.0s
 => => transferring context: 315B                        0.0s
 => [erpnext-nginx frappe 1/5] FROM docker.io/nginxinc/  0.0s
 => [erpnext-nginx internal] load build context          0.0s
 => => transferring context: 315B                        0.0s
 => [erpnext-worker internal] load build definition fro  0.0s
 => [erpnext-worker internal] load .dockerignore         0.0s
 => CANCELED [frappe-worker internal] load metadata for  1.2s
 => [frappe-worker internal] load .dockerignore          0.0s
 => [frappe-worker internal] load build definition from  0.0s
------
 > [frappe-socketio stage-1 7/8] RUN cd apps/frappe && npm install:
#0 2.105 npm ERR! code EACCES
#0 2.106 npm ERR! syscall open
#0 2.108 npm ERR! path /home/frappe/frappe-bench/apps/frappe/package.json
#0 2.108 npm ERR! errno -13
#0 2.111 npm ERR! Error: EACCES: permission denied, open '/home/frappe/frappe-bench/apps/frappe/package.json'
#0 2.111 npm ERR!  [Error: EACCES: permission denied, open '/home/frappe/frappe-bench/apps/frappe/package.json'] {
#0 2.111 npm ERR!   errno: -13,
#0 2.111 npm ERR!   code: 'EACCES',
#0 2.112 npm ERR!   syscall: 'open',
#0 2.112 npm ERR!   path: '/home/frappe/frappe-bench/apps/frappe/package.json'
#0 2.112 npm ERR! }
#0 2.112 npm ERR!
#0 2.112 npm ERR! The operation was rejected by your operating system.
#0 2.112 npm ERR! It is likely you do not have the permissions to access this file as the current user
#0 2.112 npm ERR!
#0 2.112 npm ERR! If you believe this might be a permissions issue, please double-check the
#0 2.112 npm ERR! permissions of the file and its containing directories, or try running
#0 2.112 npm ERR! the command again as root/Administrator.
#0 2.114
#0 2.114 npm ERR! A complete log of this run can be found in:
#0 2.114 npm ERR!     /home/frappe/.npm/_logs/2022-06-24T02_50_00_579Z-debug-0.log
------
error: failed to solve: executor failed running [/bin/sh -c cd apps/frappe && npm install]: exit code: 243
FROM alpine/git as builder

ARG FRAPPE_VERSION                                                               ARG FRAPPE_REPO=https://github.com/frappe/frappe
RUN git clone --depth 1 -b ${FRAPPE_VERSION} ${FRAPPE_REPO} /opt/frappe


FROM node:17-alpine

RUN addgroup -S frappe \
    && adduser -S frappe -G frappe
USER frappe

WORKDIR /home/frappe/frappe-bench
RUN mkdir -p sites apps/frappe

COPY --chown=frappe:frappe --from=builder /opt/frappe/socketio.js /opt/frappe/no>
COPY --chown=frappe:frappe package.json apps/frappe/

RUN cd apps/frappe \
    && npm install

WORKDIR /home/frappe/frappe-bench/sites

CMD [ "node", "/home/frappe/frappe-bench/apps/frappe/socketio.js" ]

Got it working by adding --chown=frappe:frappe to both COPY commands because after changing user with ’ USER frappe ’ every other commands working in frappe user except COPY command

You wish to send PR? It’ll trigger tests to verify if everything is working.

@revant_one Yes but I didn’t done it before?