DigitalShoestringSolutions / ScrapMonitoring

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

docker compose build takes a long time #2

Closed tobyaharris closed 4 months ago

tobyaharris commented 7 months ago

This is one of the solutions that builds particularly slowly. Following the guide, docker compose build takes >30min on a 2GB Pi4b. In addition to taking a long time, the display often freezes and it can be several minutes before keyboard/mouse inputs are visible. Notably for most of this time it is stuck on RUN npm install, which takes 10s of minutes.

Is there anything we can do about this? Do we make enough use of npm to justify such a big install? Are there any alternative packages that install quicker with similar functionality?

Greg-Hawkridge commented 5 months ago

RUN npm install isn't installing npm - it is using npm to install the packages needed to build the user input UI. It then performs the build which is also intensive.

10 trims the imports as much as possible, but nothing more can really be done easily.