HUB
Sign inSign up
rstudio logo

agaveplatform/rstudio

By agaveplatform

•Updated about 8 years ago

Agave Platform's RStudio image bundled with examples, CLI, and both R and Python SDK

Image
0

256

agaveplatform/rstudio repository overview

⁠Agave RStudio Server

Power your digital lab and reduce the time from theory to discovery using the Agave Science-as-a-Service API Platform. Agave provides hosted services that allow researchers to manage data, conduct experiments, and publish and share results from anywhere at any time.

⁠Overview

The Agave RStudio Server image is built from the popular rocker/rstudio:3.4.3⁠ image. The image is enhanced with preconfigured installation of the Agave [CLI](https://github.com/agaveplatform/agave-cli⁠, Python (agavepy⁠) and R (rAgave⁠) SDK, and installers to automate the synchronization of notebooks from Agave's "AP" series of tutorials⁠.

For more information on customizing the RStudio Server environment can be found in their Github repository⁠.

⁠Prerequisites

The only requirement is Docker⁠ and Docker Compose⁠. Please consult the official Docker website for installation instructions for your system.

⁠Building

You can build the Docker image either manually or using the included docker-compose.yml file. To build manually, run the following command:

docker build -it --rm -t rstudio:2.4.3 .

To build with Docker Compose, run the following command from the project root directory.

docker-compose build

⁠Using the image

This repository includes a docker-compose.yml file, which will start up your RStudio Server with some sensible defaults an create a persistent data volume to preserve your session data to your docker host and make it available between runs.

To start your RStudio Server, run the following command from the repository root directory. cd to the project folder and

$ docker-compose up -d

The first time you run the command, the Docker image will be downloaded to your host machine. This can take a while depending on the speed of your internet connection.

Once started, point your browser to http://:8787 and access the RStudio server. Login using:

  • username: rstudio
  • password: rstudio
⁠Environment variables

Upon startup, the server will search the environment for any variables that begin with AGAVE_. Any variables it finds will be copied to your ~/.Renviron file and made available in your RStudio session environment. Thus, by setting the AGAVE_USERNAME, AGAVE_PASSWORD, and AGAVE_TENANT variables in your container environment, you will be able to start interacting with the Agave Platform without having to deal with authentication, client key management, etc. in the CLI or any of the Agave SDK you use.

The docker compose file included in this repository will look for the AGAVE_USERNAME, AGAVE_PASSWORD, and AGAVE_TENANT environment variables in your local systme environment and attempt to populate the container's environment with those values. To change this, or add any additional variables, you can edit the docker-compose.yml file. The full list of variables supported is given below.

NameDescription
=====================================================================
AGAVE_ACCESS_TOKENOAuth2 bearer token returned from the tokens API
AGAVE_BASEBase URL to the tenant to which you would like to connect.
AGAVE_CACHE_DIRThe irectory where the auth cache file created by the CLI an SDK should be stored. Defaults to $HOME/.agave
AGAVE_CACHE_VARThe prefix used on all keys when caching session data.
AGAVE_CLIENT_KEYThe API client key used to obtain and refresh auth tokens.
AGAVE_CLIENT_SECRETThe API client secret used to obtain and refresh auth tokens.
AGAVE_CLI_COMPLETION_CACHE_APPSTruthy variable indicating whether calls to the Apps API should be cached.
AGAVE_CLI_COMPLETION_CACHE_CLIENTSTruthy variable indicating whether calls to the Clients API should be cached.
AGAVE_CLI_COMPLETION_CACHE_FILESTruthy variable indicating whether calls to the Files API should be cached.
AGAVE_CLI_COMPLETION_CACHE_JOBSTruthy variable indicating whether calls to the Jobs API should be cached.
AGAVE_CLI_COMPLETION_CACHE_LIFETIMEDuration in seconds that the cache should remain valid.
AGAVE_CLI_COMPLETION_CACHE_METADATATruthy variable indicating whether calls to the Metadata API should be cached.
AGAVE_CLI_COMPLETION_CACHE_MONITORSTruthy variable indicating whether calls to the Monitors API should be cached.
AGAVE_CLI_COMPLETION_CACHE_NOTIFICATIONSTruthy variable indicating whether calls to the Notifications API should be cached.
AGAVE_CLI_COMPLETION_CACHE_POSTITSTruthy variable indicating whether calls to the PostIts API should be cached.
AGAVE_CLI_COMPLETION_CACHE_PROFILESTruthy variable indicating whether calls to the Profiles API should be cached.
AGAVE_CLI_COMPLETION_CACHE_SYSTEMSTruthy variable indicating whether calls to the Systems API should be cached.
AGAVE_CLI_COMPLETION_CACHE_TAGSTruthy variable indicating whether calls to the Tags API should be cached.
AGAVE_CLI_COMPLETION_CACHE_TENANTSTruthy variable indicating whether calls to the Tenants API should be cached.
AGAVE_CLI_COMPLETION_CACHE_TRANSFORMSTruthy variable indicating whether calls to the Transforms API should be cached.
AGAVE_CLI_COMPLETION_CACHE_TRANSFERSTruthy variable indicating whether calls to the Transfers API should be cached.
AGAVE_CLI_COMPLETION_SHOW_FILESTruthy variable indicating whether completions should be shown on the files API.
AGAVE_CLI_COMPLETION_SHOW_FILE_IMPORTSTruthy variable indicating whether completions should be shown when specifying the source parameter of the files import command.
AGAVE_CLI_COMPLETION_SHOW_FILE_PATHSTruthy variable indicating whether completion should be shown when building file paths.
AGAVE_CLI_COMPLETION_SHOW_JOB_OUTPUTS_PATHSTruthy variable indicating whether completion should be shown when building job output paths.
AGAVE_CLI_HOMELocation of the AGAVE cli base directory.
AGAVE_DEVEL_MODEShould requests be made against a development version of the Agave Platform.
AGAVE_DEVURLURL of the development Agave Platform services.
AGAVE_DEV_TENANTS_API_BASEURLURL of the development Agave Platform tenants API.
AGAVE_ENABLE_AUTO_REFRESHShould
AGAVE_JSON_PARSERWhich JSON parser should the CLI use. One of jq, python, json-mirror, native. Defaults to jq.
AGAVE_PASSWORDThe password used to login to the tenant.
AGAVE_TENANTThe code of the tenant to which requsts will be made. Defaults to "agave.prod"
AGAVE_TENANTS_API_BASEURLURL of the Agave Platform tenants API.
AGAVE_USERNAMEThe usernamed used to login to the tenant.
⁠Quickstarts

After logging in to your RStudio server, you will see an example folder in your home directory with several Rmarkdown files in it. Each of these is a quickstart tutorial on a specific topic around using the Agave Platform and, specifically, the Agave R SDK, "rAgave." For first time users, the R-quickstart.Rmd file is the best place to begin.

⁠References

⁠License

The Agave Platform and rAgave are licensed under the BSD 3-Clause license⁠.

Tag summary

Content type

Image

Digest

Size

468.8 MB

Last updated

about 8 years ago

docker pull agaveplatform/rstudio:3.4.3