This is a Docker container for R 4.1.0 with RStudio, Intel Math Kernel Library (MKL), and umx
package pre-installed.
umx
is a package designed to make structural equation modeling easier, from building, to modifying and reporting.
umx
includes high-level functions for complex models such as multi-group twin models, as well as graphical model output.
sudo docker pull diffpsych/umx
Map a host folder to the container so the container can access files on host and write out results. This is important since the --rm flag is there to tell the Docker Daemon to clean up the container and remove the file system after the container exits. Make sure you run the container as a non-root user.
sudo docker run -d --rm -v $(pwd):/home/rstudio/data -e USERID=$UID -p 8787:8787 -e PASSWORD=<password> diffpsych/umx
You can then open a web browser pointing to your docker host on port 8787. Username to login to RStudio is rstudio
and the password is whatever you set when you ran the container.
More details about sharing volumes and permissions on rocker wiki
docker run
and common flags:
Argument | Explanation |
---|---|
-i | Interactive (usually used with -t) |
-t | Give a terminal interface for a CLI |
-p | Publish Ports: -p <host port>:<container port> |
-d | Detached mode: run the container in the background (opposite of -i -t) |
-v | Mount a volume from inside your container (that has been specified with the VOLUME instruction in the Dockerfile) |
--rm | Remove your container from the host when it stops running (only available with -it) |
sudo docker ps
sudo docker kill <container ID>
umx::umxVersion()
umx::umx_check_parallel()
umx::umx_set_cores()
#if empty, shows number of available cores
plot(benchmarkme::benchmark_std(runs=1))