Hello, looks like the full stack to run Frappe/ERPNext on ARM servers in available:
Python
NodeJS
MariaDB
Redis
NGINX
And the install inscript looks like suport ARM 64.
https://github.com/frappe/bench/blob/develop/install.py#L163
Does any one have installed Frappe ERP/Next on a ARM VPS?
I am looking at AWS Graviton (Graviton de AWS – Amazon Web Services ) or Oracle Ampere A1 (Ampere A1 Compute | Oracle ).
opened 07:56PM - 26 Jun 21 UTC
closed 12:27AM - 08 Sep 21 UTC
enhancement
no-issue-activity
<!--
Welcome to the Frappe Framework issue tracker! Before creating an issue, p… lease heed the following:
1. Use the search function before creating a new issue. Duplicates will be closed and directed to the original discussion.
2. When making a feature request, make sure to be as verbose as possible. The better you convey your message, the greater the drive to make it happen.
-->
When building arm64 images it would take more than couple of hours. Main reason, why it was very slow, pandas wheels were being build while docker image was being built.
Looks like that issue is gone. I have managed to build frappe-nginx, frappe-worker, frappe-socketio, erpnext-nginx, erpnext-worker under half an hour, all 5 images combined.
I have built the images from develop branches.
I had to add one line in 2 dockerfiles, for the process to work. Because there are some smaller wheels are still being built while building images, so pip3 was required. I showed the lines that I added/modified below just to explain myself properly.
**Dockerfile of frappe-worker**
```FROM python:3.7-slim-buster
# Add non root user without password
RUN useradd -ms /bin/bash frappe
ARG GIT_REPO=https://github.com/frappe/frappe
ARG GIT_BRANCH=develop
ARG ARCH=amd64
ENV PYTHONUNBUFFERED 1
ENV NVM_DIR=/home/frappe/.nvm
ENV NODE_VERSION=14.17.0
ENV PATH="/home/frappe/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
# Install dependencies
WORKDIR /home/frappe/frappe-bench
RUN apt-get update -y && apt-get install \
# for frappe framework
git \
mariadb-client \
postgresql-client \
gettext-base \
wget \
wait-for-it \
#######################
python3-pip \ ############ This is the line that I added
########################
# for PDF
libjpeg62-turbo \
libx11-6 \
libxcb1 \
libxext6 \
libxrender1 \
libssl-dev \
fonts-cantarell \
xfonts-75dpi \
xfonts-base \
libxml2 \
libffi-dev \
libjpeg-dev \
zlib1g-dev \
# For psycopg2
libpq-dev \
# For arm64 python wheel builds
gcc \
g++ -y \
# Detect arch, download and install wkhtmltox
&& if [ `uname -m` = 'aarch64' ]; then export ARCH=arm64; fi \
&& if [ `uname -m` = 'x86_64' ]; then export ARCH=amd64; fi \
&& wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_${ARCH}.deb \
&& dpkg -i wkhtmltox_0.12.6-1.buster_${ARCH}.deb && rm wkhtmltox_0.12.6-1.buster_${ARCH}.deb \
&& wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh \
&& chown -R frappe:frappe /home/frappe
# Setup docker-entrypoint
COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
USER frappe
# Install nvm with node
RUN bash install.sh \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install ${NODE_VERSION} \
&& nvm use v${NODE_VERSION} \
&& nvm alias default v${NODE_VERSION}
# Create frappe-bench directories
RUN mkdir -p apps logs commands sites /home/frappe/backups
# Setup python environment
RUN python -m venv env \
&& . env/bin/activate \
&& pip3 install --upgrade pip \
&& pip3 install gevent \
&& cd apps \
&& git clone --depth 1 -o upstream ${GIT_REPO} --branch ${GIT_BRANCH} \
&& pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/frappe
# Copy scripts and templates
COPY build/common/commands/* /home/frappe/frappe-bench/commands/
COPY build/common/common_site_config.json.template /opt/frappe/common_site_config.json.template
COPY build/common/worker/install_app.sh /usr/local/bin/install_app
COPY build/common/worker/bench /usr/local/bin/bench
COPY build/common/worker/healthcheck.sh /usr/local/bin/healthcheck.sh
# Use sites volume as working directory
WORKDIR /home/frappe/frappe-bench/sites
VOLUME [ "/home/frappe/frappe-bench/sites", "/home/frappe/backups", "/home/frappe/frappe-bench/logs" ]
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["start"]
```
**Dockerfile of frappe-nginx**
```
# This image uses nvm and same base image as the worker image.
# This is done to ensures that node-sass binary remains common.
# node-sass is required to enable website theme feature used
# by Website Manager role in Frappe Framework
FROM python:3.7-slim-buster
ARG GIT_REPO=https://github.com/frappe/frappe
ARG GIT_BRANCH=develop
ENV NVM_DIR=/root/.nvm
ENV NODE_VERSION=14.17.0
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN apt-get update -y \
##################################################################################
&& apt-get install wget python2 git build-essential python3-pip -y \########### This is the line I have modified
##################################################################################
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh \
&& chmod +x install.sh \
&& ./install.sh \
&& . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} \
&& nvm use v${NODE_VERSION} && npm install -g yarn
WORKDIR /home/frappe/frappe-bench
RUN mkdir -p /home/frappe/frappe-bench/sites \
&& echo "frappe" > /home/frappe/frappe-bench/sites/apps.txt
RUN mkdir -p apps sites/assets/css \
&& cd apps \
&& git clone --depth 1 ${GIT_REPO} --branch $GIT_BRANCH
RUN cd /home/frappe/frappe-bench/apps/frappe \
&& yarn \
&& yarn run production \
&& yarn install --production=true
RUN node --version \
&& npm --version \
&& yarn --version
RUN git clone --depth 1 https://github.com/frappe/bench /tmp/bench \
&& mkdir -p /var/www/error_pages \
&& cp -r /tmp/bench/bench/config/templates /var/www/error_pages
RUN mkdir -p /home/frappe/frappe-bench/sites/assets/frappe/ \
&& cp -R /home/frappe/frappe-bench/apps/frappe/frappe/public/* /home/frappe/frappe-bench/sites/assets/frappe \
&& cp -R /home/frappe/frappe-bench/apps/frappe/node_modules /home/frappe/frappe-bench/sites/assets/frappe/
FROM nginx:latest
COPY --from=0 /home/frappe/frappe-bench/sites /var/www/html/
COPY --from=0 /var/www/error_pages /var/www/
COPY build/common/nginx-default.conf.template /etc/nginx/conf.d/default.conf.template
COPY build/frappe-nginx/docker-entrypoint.sh /
RUN apt-get update && apt-get install -y rsync && apt-get clean \
&& echo "#!/bin/bash" > /rsync \
&& chmod +x /rsync
VOLUME [ "/assets" ]
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]
```
You can build and use arm64 images for docker
I was used this script.
System Oracal A1 ARM Ubuntu 18.04.
any Suggestion.
I want install ERPNext on ARM Based architecture. Have Any Script?
Hi, try this and see if this helps you install it on arm64:
Hi All,
I managed to install ERPnext 13 on a Oracle arm64 server (that too in a LXC container) without much hassle. I will try to make a full guide in the coming weeks, but if someone wants to try now than please do this:
I followed the steps highlighted here: How to deploy ERPNext 13 on Ubuntu 20.04 LTS (Focal Fossa) | Scaleway Documentation and just changed amd64 to arm64 for the instructions to install wkhtmltopdf.
There was a few errors, but the markupsafe error was resolved by sudo pip u…
1 Like
Step-by-step guide for installing an ERPNext server with a custom domain and two sites on Oracle using Ampere
Initial Server Setup : I’m utilizing a server with these specifications: 4 vCPUs, 24GB of RAM, and 100GB of disk storage. As of now, I’m only billed around $4.25 per month for storage.
Why Use Ampere Processor : The main reason for using Ampere processor is to cut down costs.
Learning Docker : As a Docker beginner, I found the guide, particularly helpful. The Single Server Example is comprehensive. Thanks @revant_one
Oracle Server Installation : If you are not sure how to proceed, you can use this video tutorial as a guide.
Opening Ports 80 and 443 : Ports 80 and 443 need to be opened. Here’s a video tutorial if you need assistance with this.
Domain Configuration : I added these A records to my domain:
traefik.example.com
pointing to the server IP
erpnext-one.example.com
pointing to the server IP
erpnext-two.example.com
pointing to the server IP
Modifying Hosts File : I updated the /etc/hosts
file to include the following hostnames:
192.168.205.11 traefik.example.com
192.168.205.11 erpnext-one.example.com
192.168.205.11 erpnext-two.example.com
Docker Installation : I used this guide to install Docker.
Adapting the Guide for ARM : There were some parts of the guide that needed to be adapted to work with ARM. I downloaded the ARM version of Docker Compose and installed it using the following command:
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.19.0/docker-compose-linux-aarch64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
For more details, refer to the official Docker guide .
Traefik and MariaDB Installation : The installation of Traefik and MariaDB was straightforward.
ERPNext Installation : The Docker image is not compatible with ARM, so I had to manually build it. Here are the steps I followed:
I copied the Containerfile
from frappe_docker/images/production/
to frappe_docker
and renamed it to Dockerfile
.
I ran the command docker build -t frappe/erpnext:v14.27.9 .
to build the image. Note that the image version must match the variable in erpnext-one.env
.
@revant_one I sincerely hope to have an official image available on Docker soon. I would greatly appreciate any support in achieving this. Thank you.
Cloudflare Configuration : If you’re using Cloudflare, remember to turn off the proxy for your DNS records, allowing Traefik to generate your SSL correctly. Once the site is configured, you can turn it back on.
Creating Persistent Volumes : If you’re interested in creating persistent volumes, refer to this guide .
I have covered the installation of ERPNext on ARM in this video. The installation uses docker for it.
1 Like