knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
This document describes how the docker container was created and how to use it.
The Dockerfile
was created with golem::add_dockerfile()
. This generates a Dockerfile
with install commands for (almost) all R packages. The generated Dockerfile
was used as basis to create the final Dockerfile
.
Packages added manually:
To create the python environment a small R script was developed (based on installation instruction of omicser
). This file is copied into the container and executed during build of the container.
To make sure the correct python environment is used, an .Renviron
file was created which uses an environment from reticulate
to force the correct python environment. The .Renviron
file is copied and copied to the correct location during build of the container.
The omicser
app needs a config file (app_config.yml
) to run. For now a config file is already prepared and copied into the container and copied to the correct location. In the app_config.yml
you need the database names set correctly for your system. The other parameters you should not need to change!
All the additional files needed to create the docker container or in folder docker_stuff
.
The current setup leaves the database files outside the container. During start up of the container the location of the database files need to be coupled to the database folder inside the container.
The location of the Dockerfile
needs to be the root of your project folder. Build the container with:
docker build --tag omicser_container .
Run the container as follows:
docker run -d -p 3939:3939 -v /my_location/of/databases/:/root/DB/ omicser_container
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.