opensafely-core / codespaces-initiative

Improving the use of OpenSAFELY in Codespaces
MIT License
0 stars 0 forks source link

Consider switching to `universal` devcontainers image #33

Closed StevenMaude closed 3 months ago

StevenMaude commented 3 months ago

This is the default image for GitHub Codespaces if none is specified:

"image": "mcr.microsoft.com/devcontainers/universal:linux",

It adds no storage cost, unlike other images, and already has Python installed.

It seems to launch quickly for me, which is presumably because it's cached. Maybe that's no advantage if prebuilds are used.

The research template only uses a Python-specific image because that's what seemed sensible, when I first configured it through VSCode.

StevenMaude commented 3 months ago

One downside of this is that the version of the image or of Python can't be pinned. Whereas with the Python image, you can require 3.11.

The Python image has three benefits:

lucyb commented 3 months ago

I expect we'll want to install python 3.10, like version 2 of the python action image. So, I think anything that doesn't allow us to specify that exact version will not be a good idea.

We'll also probably want to install the relevant python (and maybe R packages, see https://github.com/opensafely-core/codespaces-initiative/issues/9) into the image, rather than install them at start up, so I expect we'll want to have a custom Dockerfile.

I'm going to close this issue for now, but if I've missed anything please comment or reopen it.