Tutor MFE for ARM64

Hi,

I have a working instance of openedx on mac m1 thanks to instructions from the documentation but I cannot set tutor-mfe up despite following instructions here.

I am now getting the following error.

 => ERROR [learning-dev 3/5] RUN npm clean-install --no-audit --no-fund   55.2s
 => CANCELED [account-dev 3/5] RUN npm clean-install --no-audit --no-fun  57.3s
 => CANCELED [profile-dev 3/5] RUN npm clean-install --no-audit --no-fun  57.8s
 => CACHED [account-i18n 1/4] COPY --from=account-src /openedx/app/src/i1  0.0s
 => CACHED [account-i18n 2/4] COPY --from=i18n /openedx/i18n/account /ope  0.0s
 => CACHED [account-i18n 3/4] COPY --from=i18n /openedx/i18n/i18n-merge.j  0.0s
 => CACHED [account-i18n 4/4] RUN /openedx/i18n/i18n-merge.js /openedx/ap  0.0s
 => CACHED [profile-i18n 1/4] COPY --from=profile-src /openedx/app/src/i1  0.0s
 => CACHED [profile-i18n 2/4] COPY --from=i18n /openedx/i18n/profile /ope  0.0s
 => CACHED [profile-i18n 3/4] COPY --from=i18n /openedx/i18n/i18n-merge.j  0.0s
 => CACHED [profile-i18n 4/4] RUN /openedx/i18n/i18n-merge.js /openedx/ap  0.0s
------
 > [learning-dev 3/5] RUN npm clean-install --no-audit --no-fund --registry=https://registry.npmjs.org/   && rm -rf ~/.npm:
#50 55.01 Killed
------
executor failed running [/bin/sh -c npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY   && rm -rf ~/.npm]: exit code: 137
Error: Command failed with status 1: docker build -t docker.io/overhangio/openedx-mfe:14.0.0 /Users/hargunoberoi/Library/Application Support/tutor/env/plugins/mfe/build/mfe

Can anyone please guide me the a relevant resource on this?

I think it’s because of missing imagemin-pngquant. Right? If yes, adding libpng-dev to mfe dockerfile can solve your problem.

Hey @Hargun_Oberoi,

the “exit code: 137” means out of memory. Could you check that the docker desktop is configured with at least 4.5Gb of memory and 1.5Gb of swap?

Hi @andrey.kryachko,

thanks for the response. I changed the docker configuration but now I get this error:

#49 66.73 npm notice Run `npm install -g npm@8.19.2` to update!
#49 66.88 npm notice
#49 73.01 npm ERR! code ERR_SOCKET_TIMEOUT
#49 75.73 npm ERR! network Socket timeout
#49 75.73 npm ERR! network This is a problem related to network connectivity.
#49 75.73 npm ERR! network In most cases you are behind a proxy or have bad network settings.
#49 75.73 npm ERR! network
#49 75.73 npm ERR! network If you are behind a proxy, please make sure that the
#49 75.73 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
#49 76.28
#49 76.28 npm ERR! A complete log of this run can be found in:
#49 76.28 npm ERR!     /root/.npm/_logs/2022-09-18T20_14_30_716Z-debug-0.log
------
executor failed running [/bin/sh -c npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY   && rm -rf ~/.npm]: exit code: 1
Error: Command failed with status 1: docker build -t docker.io/overhangio/openedx-mfe:14.0.0 /Users/hargunoberoi/Library/Application Support/tutor/env/plugins/mfe/build/mfe

Any idea what this implies?

Based on the discussion here:

I tried adding these two lines of code in my mfe dockerfile:

RUN npm config set fetch-retry-mintimeout 20000
RUN npm config set fetch-retry-maxtimeout 120000

but I get an exit code 137

 => ERROR [account-dev 5/7] RUN npm clean-install --no-audit --no-fund -  36.3s
 => [learning-dev 3/7] RUN npm config set fetch-retry-mintimeout 20000     0.8s
 => CACHED [learning-i18n 1/4] COPY --from=learning-src /openedx/app/src/  0.0s
 => CACHED [i18n 1/3] COPY ./i18n /openedx/i18n                            0.0s
 => CACHED [i18n 2/3] RUN chmod a+x /openedx/i18n/*.js                     0.0s
 => CACHED [i18n 3/3] RUN echo "copying i18n data"   && mkdir -p /openedx  0.0s
 => CACHED [learning-i18n 2/4] COPY --from=i18n /openedx/i18n/learning /o  0.0s
 => CACHED [learning-i18n 3/4] COPY --from=i18n /openedx/i18n/i18n-merge.  0.0s
 => CACHED [learning-i18n 4/4] RUN /openedx/i18n/i18n-merge.js /openedx/a  0.0s
 => [profile-dev 3/7] RUN npm config set fetch-retry-mintimeout 20000      0.8s
 => CACHED [gradebook-i18n 1/4] COPY --from=gradebook-src /openedx/app/sr  0.0s
 => CACHED [gradebook-i18n 2/4] COPY --from=i18n /openedx/i18n/gradebook   0.0s
 => CACHED [gradebook-i18n 3/4] COPY --from=i18n /openedx/i18n/i18n-merge  0.0s
 => CACHED [gradebook-i18n 4/4] RUN /openedx/i18n/i18n-merge.js /openedx/  0.0s
 => CACHED [account-i18n 1/4] COPY --from=account-src /openedx/app/src/i1  0.0s
 => CACHED [account-i18n 2/4] COPY --from=i18n /openedx/i18n/account /ope  0.0s
 => CACHED [account-i18n 3/4] COPY --from=i18n /openedx/i18n/i18n-merge.j  0.0s
 => CACHED [account-i18n 4/4] RUN /openedx/i18n/i18n-merge.js /openedx/ap  0.0s
 => CACHED [profile-i18n 1/4] COPY --from=profile-src /openedx/app/src/i1  0.0s
 => CACHED [profile-i18n 2/4] COPY --from=i18n /openedx/i18n/profile /ope  0.0s
 => CACHED [profile-i18n 3/4] COPY --from=i18n /openedx/i18n/i18n-merge.j  0.0s
 => CACHED [profile-i18n 4/4] RUN /openedx/i18n/i18n-merge.js /openedx/ap  0.0s
 => [learning-dev 4/7] RUN npm config set fetch-retry-maxtimeout 120000    0.6s
 => [profile-dev 4/7] RUN npm config set fetch-retry-maxtimeout 120000     0.6s
 => CANCELED [learning-dev 5/7] RUN npm clean-install --no-audit --no-fu  38.7s
 => CANCELED [profile-dev 5/7] RUN npm clean-install --no-audit --no-fun  39.4s
------
 > [account-dev 5/7] RUN npm clean-install --no-audit --no-fund --registry=https://registry.npmjs.org/   && rm -rf ~/.npm:
#17 36.11 Killed
------
executor failed running [/bin/sh -c npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY   && rm -rf ~/.npm]: exit code: 137
Error: Command failed with status 1: docker build -t docker.io/overhangio/openedx-mfe:14.0.0 /Users/hargunoberoi/Library/Application Support/tutor/env/plugins/mfe/build/mfe

I’m a little clueless now. Any help would be greatly appreciated.

Hi guys,

Just want to mention that if anyone else faces the issues I’ve mentioned above, it maybe because of low memory. I increased the available memory for docker to 7 Gb and it worked fine.

Thanks again @andrey.kryachko and @thawhakyi

I used 24gb RAM instance. In my case, I had an error with missing imagemin-pngquant. So I added libpng-dev package in mfe dockerfile and the problem is fixed.

1 Like