-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create improved dev container configuration #43
Comments
This will provide a development environment for researchers containing: * Python 3.10 * The equivalent Python packages based on the Python Action image, including ehrql * R 4.0.5 * RStudio * The equivalent R packages based on the R Action image This can be used in Codespaces or locally via devcontainers in VS Code. It's based on the work being done for opensafely-core/codespaces-initiative#43.
This will provide a development environment for researchers containing: * Python 3.10 * The equivalent Python packages based on the Python Action image, including ehrql * R 4.0.5 * RStudio * The equivalent R packages based on the R Action image This can be used in Codespaces or locally via devcontainers in VS Code. It's based on the work being done for opensafely-core/codespaces-initiative#43.
This will provide a development environment for researchers containing: * Python 3.10 * The equivalent Python packages based on the Python Action image, including ehrql * R 4.0.5 * RStudio * The equivalent R packages based on the R Action image This can be used in Codespaces or locally via devcontainers in VS Code. It's based on the work being done for opensafely-core/codespaces-initiative#43.
As part of testing these changes, I've sent the new configuration to Tom P, Will and Rose. It's worked fine for Tom P and Rose, so far. Still waiting to hear back from Will. One external user is keen to try it out (thread). |
This required looking inside the rocker scrips that read that env var and copying its behaviour. You may have to clear cookies for this to work. |
Following advice from Tom P, I've removed renv from the equation and dropped them in the system library |
Done, needed to change the path in the smoke test accordingly. Used For some reason the virtualenv isn't activating in my local devcontainer run of this. I'll push an updated image and see if that's the case in codespaces. |
OK so at least some of the problems I've been having are to do with the path to the virtualenv no longer matching what's in the activation script (which is created upon virtualenv creation). I suggest reverting to |
I've rebased such that there never was a Dockerfile in there in the first place |
I think this issue is closed by opensafely#120.
I think the above will be addressed by: |
#120 merged |
Based on the investigation done in #9.
Our aim is to provide a Codepsaces environment that's ready to go for researchers using Python or RStudio to write code for the OpenSAFELY pipeline.
This configuration will provide a development environment for researchers containing:
We are not expecting to support work done outside of the OpenSAFELY pipeline or analyses done in Stata. We will provide only limited support for older studies, as we're aiming our efforts currently towards newer users.
This configuration will be used to create Codespaces by researchers, so it should be tested out by several researchers before it can be considered complete.
It does not need to particularly fast, but does need to be fast enough to reasonably use. This means we'll need to build a Docker image and upload it to ghcr, rather than build an image on each Codespace start up.
As part of this ticket, we should consider how we're going to version changes to both the Docker image and the other devcontainer configuration. For example, we could agree to avoid referencing the "latest" tag by default and start with a v1.EDIT: we'll do this in ticket x.We should consider how we'll release this update to the research-template repo to new and existing users. We may want to script the creation of PRs to make it easier, especially as we anticipate further updates. This automation work should also be done in another ticket (see #47).
The majority of the changes to the research template itself are in this PR.
TODO
Add the VS Code r language extension into the devcontainer config(ignore for this ticket)Consider adding the the languageserver, radian and httpgd packages to make use of the r language extension(ignore for this ticket)DISABLE_AUTH=true sudo rstudio-server start
works to remove the login prompt. It's possible that the env var isn't being passed into the dev container though. If it doesn't work, don't try to fix and consider this item done.Moved to Pass workspace base directory to post-creation script instead of usingpwd
#57The text was updated successfully, but these errors were encountered: