Closed evalott100 closed 8 months ago
The short term fix is to use the standard copier Dockerfile in PandABlocks-ioc. Please can you see if that works?
The long term is to build a devcontainer from the Dockerfile as per: https://github.com/devcontainers/ci/blob/main/docs/github-action.md
Then run the command within that devcontainer
I've set up the CI such that if the python-version
is "dev-container"
it will wait for the dev container CI build then take the ghcr link as an input and rather than building a new venv with the same python version as the devcoontainer, it just runs the devcontainer. If the python-version
is anything else then it will build the venv as normal.
When we install requirements the CI is set up such that a
python_version
of"dev"
will have theinstall_requirements
action parse the Dockerfile for aPYTHON_VERSION
:https://github.com/DiamondLightSource/python-copier-template/blob/f566310c8b09e173081c16f47f50b7584fb1e43c/.github/actions/install_requirements/action.yml#L14-L20
In converting the pandablocks-ioc I found some issues with this, @gilesknap's Dockerfile doesn't include a
$PYTHON_VERSION
env assignment directly. Should we be assuming all projects will?I think it would be far nicer to have a
than to assume the that all Dockerfiles will have a
PYTHON_VERSION=
?@M-Chan @coretl