Each time the R drive files are update, we need to collate all the meta data from each of the stata files. The create_dictionary_from_stata.R
automates this process. But the script needs access to the R drive, and ideally runs in parallel and not through the VPN (which is very slow).
Solution is to run the script on the crashdown.epi.bris.ac.uk
docker cluster. Steps are:
This can be done by running the following (from /path/to/alspac/inst
). Build the docker image that installs the alspac
R package
sudo docker build -t ralspac:latest .
Mount the R drive using a samba share:
mkdir -p mnt
sudo mount -t cifs -o user=$USER,vers=3.0 //central-gpfs.isys.bris.ac.uk/ALSPAC-Data mnt
(Note that on the crashdown server crashdown.epi.bris.ac.uk
needed to install the cifs-utils
package in order to mount (e.g. sudo apt-get install cifs-utils
).)
Update the dictionary within the container
cd ../
sudo docker run --rm -e PASSWORD=123qwe -p 8787:8787 \
-v "$(pwd):/home/rstudio/alspac" \
-v "$(pwd)/inst/mnt:/home/rstudio/mnt" \
-w /home/rstudio/alspac/inst \
--name ralspac ralspac:latest \
Rscript create_dictionary_from_stata.R /home/rstudio/mnt 4
Unmount the R drive
sudo umount inst/mnt
Note if that doesn't work then find which process is using it
sudo lsof inst/mnt
Then kill that process and unmount
sudo kill -9 <pid>; sudo umount inst/mnt
This should have edited the following file:
data/current.rdata
git tag
../DESCRIPTION
file to bump to the next versionrdata
files and the DESCRIPTION
filegit tag <new tag>
git push origin <new tag>
See info here https://github.com/explodecomputer/alspac-shiny
or on mac
docker build --platform linux/amd64 -t ralspac:latest .
and run
cd ../
docker run --platform linux/amd64 --rm -e PASSWORD=123qwe -p 8787:8787 \
-v "$(pwd):/home/rstudio/alspac" \
-v "/Volumes/ALSPAC-DATA:/home/rstudio/mnt" \
-w /home/rstudio/alspac/inst \
--name ralspac ralspac:latest \
Rscript create_dictionary_from_stata.R /home/rstudio/mnt 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.