feat: add a script to check environment software versions
quick utility to check environment requirements. Written with GPT's help, versions pretty open-ended for now but could become more specific as we go.
$ ./scripts/check-env.py
Status Software Version Found Ideal Range Supported Range
==============================================================================================================
✅ python 3.10.13 3.10.0 - 3.10.999 3.9.0 - 3.11.999
✅ npm 10.5.2 10.0.0 - 999.999.999 10.0.0 - 999.999.999
✅ node v18.20.0 18.0.0 - 18.999.999 18.0.0 - 18.999.999
✅ docker 26.1.4 20.10.0 - 999.999.999 19.0.0 - 999.999.999
✅ docker-compose 2.28.1 2.28.0 - 999.999.999 1.29.0 - 999.999.999
✅ git 2.44.0 2.30.0 - 999.999.999 2.20.0 - 999.999.999
✅ Memory: 16.00 GB
Seems it'd be useful for maintainers to point to the script and tell people to make some assertion on their environment. There's a whole class of confusing errors that can be weeded with something like this.
Maybe this is the right time to add a check for sufficient system and Docker memory allocation?
Yes that sounds reasonable though might require a bit more thinking as to how we structure/section things. Seems we need both a:
- "host requirements for docker-compose environment" where we check whether the version of docker, docker-compose and resource allocation look dandy
- "requirements for a local dev env" where we just look at the current env and whether its fine
I guess ultimately its more or less the same script and its about whether we run in on the host or in-docker
@rusackas I bumped node to 20
but generally should help support PRs like this one, it's really just a single/simple utility script that should prove useful
Can this be triggered in docker-bootstrap.sh or docker-init.sh or something like that?
@rusackas I bumped node to 20
Awesome... the repo has already been bumped everywhere else I can find... I'll reference this change in that PR for the next go-round. [Captain Obvious here — you approved that PR 🤦 ]
I think it belongs in docker/docker-init.sh, but we need to add it to the depends_on so all other processes depend on it. Also need to either COPY scripts inside docker or mount it. I started a branch but ran into all sort of other docker/npm/node/disk-space, more roadblocks-than-a-road-can-fit issues
Right for os-level deps, seems the right approach would be to do in-python, with dummy/minimal function that would raise if os-level-dep is missing.
def test_ zstd():
import zstd
zstd.do_something_that_will_raise_os_dep_isnt_installed()