Repository: promptfoo/promptfoo
Issue: Docker build failing.
Root cause: Environment Incompatibility

Trying to run the commands from [this page
](https://promptfoo.dev/docs/usage/self-hosting)
<details>
<pre>
201.8 npm ERR! code 1
201.8 npm ERR! path /app/src/web/nextui/node_modules/utf-8-validate
201.8 npm ERR! command failed
201.8 npm ERR! command sh -c node-gyp-build
201.8 npm ERR! gyp info it worked if it ends with ok
201.8 npm ERR! gyp info using node-gyp@10.0.1
201.8 npm ERR! gyp info using node@18.20.0 | linux | arm64
201.8 npm ERR! gyp ERR! find Python 
201.8 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
201.8 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
201.8 npm ERR! gyp ERR! find Python checking if "python3" can be used
201.8 npm ERR! gyp ERR! find Python - executable path is ""
201.8 npm ERR! gyp ERR! find Python - "" could not be run
201.8 npm ERR! gyp ERR! find Python checking if "python" can be used
201.8 npm ERR! gyp ERR! find Python - executable path is ""
201.8 npm ERR! gyp ERR! find Python - "" could not be run
201.8 npm ERR! gyp ERR! find Python 
201.8 npm ERR! gyp ERR! find Python **********************************************************
201.8 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
201.8 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
201.8 npm ERR! gyp ERR! find Python you can try one of the following options:
201.8 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
201.8 npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
201.8 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
201.8 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
201.8 npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
201.8 npm ERR! gyp ERR! find Python For more information consult the documentation at:
201.8 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
201.8 npm ERR! gyp ERR! find Python **********************************************************
201.8 npm ERR! gyp ERR! find Python 
201.8 npm ERR! gyp ERR! configure error 
201.8 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
</pre>
</details>

and after installing python it still crashes:
<details>
<pre>
221.4 npm ERR! code 1
221.4 npm ERR! path /app/src/web/nextui/node_modules/bufferutil
221.4 npm ERR! command failed
221.4 npm ERR! command sh -c node-gyp-build
221.4 npm ERR! gyp info it worked if it ends with ok
221.4 npm ERR! gyp info using node-gyp@10.0.1
221.4 npm ERR! gyp info using node@18.20.0 | linux | arm64
221.4 npm ERR! gyp info find Python using Python version 3.11.8 found at "/usr/bin/python3"
221.4 npm ERR! gyp http GET https://nodejs.org/download/release/v18.20.0/node-v18.20.0-headers.tar.gz
221.4 npm ERR! gyp http 200 https://nodejs.org/download/release/v18.20.0/node-v18.20.0-headers.tar.gz
221.4 npm ERR! gyp http GET https://nodejs.org/download/release/v18.20.0/SHASUMS256.txt
221.4 npm ERR! gyp http 200 https://nodejs.org/download/release/v18.20.0/SHASUMS256.txt
221.4 npm ERR! gyp info spawn /usr/bin/python3
221.4 npm ERR! gyp info spawn args [
221.4 npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
221.4 npm ERR! gyp info spawn args 'binding.gyp',
221.4 npm ERR! gyp info spawn args '-f',
221.4 npm ERR! gyp info spawn args 'make',
221.4 npm ERR! gyp info spawn args '-I',
221.4 npm ERR! gyp info spawn args '/app/src/web/nextui/node_modules/bufferutil/build/config.gypi',
221.4 npm ERR! gyp info spawn args '-I',
221.4 npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
221.4 npm ERR! gyp info spawn args '-I',
221.4 npm ERR! gyp info spawn args '/root/.cache/node-gyp/18.20.0/include/node/common.gypi',
221.4 npm ERR! gyp info spawn args '-Dlibrary=shared_library',
221.4 npm ERR! gyp info spawn args '-Dvisibility=default',
221.4 npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.20.0',
221.4 npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
221.4 npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.20.0/<(target_arch)/node.lib',
221.4 npm ERR! gyp info spawn args '-Dmodule_root_dir=/app/src/web/nextui/node_modules/bufferutil',
221.4 npm ERR! gyp info spawn args '-Dnode_engine=v8',
221.4 npm ERR! gyp info spawn args '--depth=.',
221.4 npm ERR! gyp info spawn args '--no-parallel',
221.4 npm ERR! gyp info spawn args '--generator-output',
221.4 npm ERR! gyp info spawn args 'build',
221.4 npm ERR! gyp info spawn args '-Goutput_dir=.'
221.4 npm ERR! gyp info spawn args ]
221.4 npm ERR! gyp ERR! build error 
221.4 npm ERR! gyp ERR! stack Error: not found: make
221.4 npm ERR! gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/lib/index.js:16:17)
221.4 npm ERR! gyp ERR! stack at which (/usr/local/lib/node_modules/npm/node_modules/which/lib/index.js:77:9)
221.4 npm ERR! gyp ERR! stack at async doWhich (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:112:22)
221.4 npm ERR! gyp ERR! stack at async loadConfigGypi (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:77:7)
221.4 npm ERR! gyp ERR! stack at async build (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:35:3)
221.4 npm ERR! gyp ERR! stack at async run (/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18)
221.4 npm ERR! gyp ERR! System Linux 5.15.49-linuxkit-pr
221.4 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
221.4 npm ERR! gyp ERR! cwd /app/src/web/nextui/node_modules/bufferutil
221.4 npm ERR! gyp ERR! node -v v18.20.0
221.4 npm ERR! gyp ERR! node-gyp -v v10.0.1
221.4 npm ERR! gyp ERR! not ok
221.4 
221.4 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-03T09_20_47_963Z-debug-0.log
221.4 npm ERR! code 1
221.4 npm ERR! path /app
221.4 npm ERR! command failed
221.4 npm ERR! command sh -c npm run install:nextui && npm run build:clean && npm run build
221.4 
</pre>
</details>


After adding  `RUN apk update && apk add python3 build-base --no-cache` into the dockerfile it was built successfully.
Plarform: macos / aarch64

Thanks for the report!  [c14b0a1](https://github.com/promptfoo/promptfoo/commit/c14b0a1656d81147e3a471fe29ddb1abf82d09fd) adds your fix