Skip to content
Sebastian Funk edited this page Feb 20, 2022 · 6 revisions

The development environment for this code is available as a Docker container. Brief instructions are use are given below.

Docker setup

Using the remote development plug-in for Virtual studio code.

  • Install Virtual studio code and the remote development plug-in.
  • Clone the repository code.
  • When prompted click to reopen the repository in a container.
  • Alternatively, run the reopen and rebuild command from the remote development plug-in.
  • A new VS code window should open with the built development environment.
  • This container can then be accessed programmatically as for other Docker containers.

Manual usage

Run the following (docker commands here and further below may or may not require the use of sudo depending on the set up):

docker pull ghcr.io/epiforecasts/covid19-uk-nowcasts-projections:main
docker tag ghcr.io/epiforecasts/covid19-uk-nowcasts-projections:main covid19-uk-nowcasts-projections

To run the docker image in the background run (NOTE: you might want to mount a folder first, see below):

docker run -d --name covid19-uk-nowcasts-projections covid19-uk-nowcasts-projections tail -f /dev/null

To mount a folder (e.g., a local clone of the covid19-uk-nowcasts-projections repo from which to run the nowcasts) set paths on the local and docker container and then use the mount option (--mount ${WORKSPACE}) with docker run, e.g.

export WORKSPACE=source=$(realpath ~)/covid19-uk-nowcasts-projections,target=/workspaces/covid19-uk-nowcasts-projections,type=bind,consistency=cached

(assuming the local lone is in ~/covid19-uk-nowcasts-projections, otherwise adjust the path given above accordingly) and then

docker run -d --mount ${WORKSPACE} --name covid19-uk-nowcasts-projections covid19-uk-nowcasts-projections tail -f /dev/null

To access the command line (or R scripts replacing bash with Rscript) run the following:

docker exec -ti covid19-uk-nowcasts-projections bash

To update the nowcasts and projections if a clone of the repo has been mounted into /workspaces/covid19-uk-nowcasts-projections as suggested above run

docker exec -ti covid19-uk-nowcasts-projections bash /workspaces/covid19-uk-nowcasts-projections/update-forecasts.sh
Clone this wiki locally