KGGA Runtime Support - RServe

Dockerfile configuration (name this file "Dockerfile_rserve"):

FROM docker.1ms.run/rocker/rstudio

LABEL author=suranyi.sysu@gmail.com

ENV USER="rstudio"

# Add package installations below
RUN Rscript -e "install.packages('countreg', repos='http://R-Forge.R-project.org');"
RUN Rscript -e "install.packages('Rserve');"

EXPOSE 6311
CMD ["R", "-e", "Rserve::run.Rserve(remote=TRUE)"]

Build the image (execute from this directory):

docker build -t rserve -f Dockerfile_rserve .

Run container:

# -p <host_port>:<container_port>
# -m Set memory limit
# -d Run in detached mode
docker run --rm -p 6300:6311 --cpus=2 -m 8g -d rserve

Stop the container:

docker container ls
docker stop <CONTAINER_ID>

Remove image:

docker image rm rserve

Copyright ©MiaoXin Li all right reservedLast modified time: 2025-04-30 02:18:41

results matching ""

    No results matching ""