run r script using docker kaggle image

I am trying to reproduce results of an R script on my local Windows OS (reproduce the results which it gave on kaggle server). For this someone suggested to use docker images to run r script on my local.

I have installed docker and finished the steps to set it up by following instructions given here

  • Can not connect to Postgres Container from pgAdmin
  • Symfony cache permissions with docker with nginx rsync
  • How to mount the volume of host to docker container with executable file permission using docker api
  • How do I run a node container on AWS ECS without exiting
  • Where are the docker daemon logs stored on ubuntu 16.04 xenial xerus?
  • How to Solve Authentication issue when pushing Docker Image using Maven to Private repository
  • After installing, I am struggling with on how to create the kaggle R image and run an R script on my local using local resources/data. Can someone please help me with these?

  • maven builds fails inside ubuntu vagrant machine as well as docker instance
  • How to put fluentd containers behind a load balancer in ECS?
  • How to use Docker (or Linux Containers) for Network Emulation?
  • docker dead but pidfile exists
  • How to solve error “bundler could not find compatible version for gem X”
  • terraform provider + docker registry v2 = 404
  • One Solution collect form web for “run r script using docker kaggle image”

    You can load already builded image rstat from dockerhub:

    docker run kaggle/rstats

    For using your local data you should create volume:

    docker run -v /you/local/data/path:path/in/docker/container kaggle/rstat

    Volume binds your local storage with container storage. Also you can create additional volume for output data.

    The last line in rstate dockerfile is

    CMD ["R"]

    It means that R console will be called after container start. Just past your script in terminal (script should use data from mounted volume in container and write result to mounted output volume). After script execution you can stop container. Your output data will be saved on your local machine.

    P.S. image is giant (6Gb). I never seen before such large docker image.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.