VICE Documentation¶
The Visual and Interactive Computing Environment (VICE) is the latest feature in CyVerse’s Discovery Environment (DE) for running interactive applications.
User Guide instructs users on basic functions of the DE: (a) how to launch an interactive app, (b) bring your data into the container, (c) run an analysis, and (d) save or upload your results to the cloud.
Developer Guide gives advanced tips about how to (a) build your own VICE-ready containers, (b) host them on a public registry, and (c) integrate them into VICE and make them available to your user community.
Last, we provide a brief list of featured VICE apps in the DE.
About¶
VICE stands for Visual Interactive Computing Environment and is a part of CyVerse Discovery Environment (DE).
VICE allows verified CyVerse users to launch customized containers of their favorite data science platforms.
What is the big idea?¶
The DE supports executable applications which run as workflows on high performance or high throughput computing environments. VICE introduces Graphic User Interfaces (GUI) and common Integrated Development Environments (IDE) such as Project Jupyter, RStudio, & Remote Desktops to the DE.
Note
How is VICE different from other DE apps?
Applications or “Apps” in the DE are classified as:
executable - meaning the user selects parameters and data for a particular analysis, and submits the job for execution (HTCondor , Tapis, OSG).
HPC - executable apps which run on Texas Advanced Computing Center Tapis as high performance computing (HPC) jobs.
OSG - executable apps which run on the OpenScienceGrid as high throughput (HTC) jobs.
VICE - interactive, visual computing environments with GUI or IDE.
# Verified User Information
To access the interactive apps in the Disocvery Environment, we ask users to provide sufficient information about themselves in their user profiles to ensure proper use of the platform.
We ask users to provide a valid email address from an organization, i.e., .org, an educational institution with the .edu ending, or a government .gov – we will not grant access to commercial email addresses, e.g., @gmail.com @yahoo.com @msn.com etc.
We also ask that users provide their |ORCID| – ORCID is the most widely adopted digital identifier for research in the world.
Prerequisites¶
Prerequisite |
Preparation/Notes |
Link/Download |
---|---|---|
CyVerse account |
You will need a CyVerse account to complete this exercise |
|
Discovery Environment access |
You will get access to Discovery Environment by default. Check the ‘My Services’ tab; if Discovery Environment is not listed, click the ‘Available’ tab, locate Discovery Environment and click the link to request access. |
Fix or improve this documentation:
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
Applications¶
Currently, VICE apps are categorized as:
Interactive Apps (e.g., Shiny, WebGL, HTML5)
Virtual Desktop Environment (e.g., Ubuntu Desktops w/ Apache Guacamole, VNC, Xpra)
1. What is JupyterLab?¶
JupyterLab is an interactive development environment for working with notebooks, code and data.
JupyterLab enables you to use text editors, terminals, file viewers, and other custom components side-by-side with notebooks in a tabbed work area. JupyterLab provides a high level of integration between notebooks, documents, and activities:
Drag-and-drop to reorder notebook cells and copy them between notebooks
Run code blocks interactively from text files (.py, .R, .md, .tex, etc.)
Link a code console to a notebook kernel to explore code interactively without cluttering up the notebook with temporary scratch work
Edit popular file formats with live preview, such as Markdown, JSON, CSV, Vega, VegaLite, and more
1.1 What is a Jupyter Notebook?¶
The Notebook (formerly IPython Notebook) is Project Jupyter’s flagship project for creating reproducible computational narratives.
It enables users to create and share documents that combine live code with narrative text, mathematical equations, visualizations, interactive controls, and other rich output.
Notebook documents (or “notebooks”) are documents produced by the Jupyter Notebook App, which contains both computer code (e.g., python, r, julia) and rich text elements (paragraph, equations, figures, comments, images, links, etc.).
1.2 JupyterLab VICE¶
The JupyterLab VICE apps are based on official Project Jupyter Images integrated into the CyVerse Discovery Environemnt (DE).
2. What is RStudio?¶
RStudio is a free and open source integrated development environment for R, a programming language for statistical computing and graphics. Some of its features include:
Customizable workbench with all of the tools required to work with R in one place (console, source, plots, workspace, help, history, etc.)
Syntax highlighting editor with code completion
Execute code directly from the source editor (line, selection, or file)
Full support for authoring Sweave and TeX documents
Runs on all major platforms (Windows, Mac, and Linux) and can also be run as a server, enabling multiple users to access the RStudio IDE using a web browser
2.1 RStudio VICE¶
The RStudio VICE apps are based on official Rocker Project Images.
3. What is Shiny?¶
Shiny is an open source R package that provides an elegant and powerful web framework for building web applications using R. Shiny helps you turn your analyses into interactive web applications without requiring HTML, CSS, or JavaScript knowledge. Some of its features include:
Build useful web applications with only a few lines of code—no JavaScript required
Shiny applications are automatically “live” in the same way that spreadsheets are live. Outputs change instantly as users modify inputs, without requiring you to reload your browser
Shiny user interfaces can be built entirely using R, or can be written directly in HTML, CSS, and JavaScript for more flexibility
Works in any R environment (Console R, Rgui for Windows or Mac, ESS, StatET, RStudio, etc.)
Attractive default UI theme based on Twitter Bootstrap
A highly customizable slider widget with built-in support for animation
Pre-built output widgets for displaying plots, tables, and printed output of R objects
Fast bidirectional communication between the web browser and R using the websockets package
Uses a reactive programming model that eliminates messy event handling code, so you can focus on the code that really matters
Develop and redistribute your own Shiny widgets that other developers can easily drop into their own applications
3.1 Shiny VICE¶
The Shiny VICE apps are based on official Rocker Project Images.
Shiny Apps require the contents of a Shiny App be added as an input folder prior to launching a VICE app - otherwise the default Shiny App demo will be the only contents in the container.
Customized Shiny Apps can be created and deployed using the Tool and App builder.
4. What is Ubuntu Desktop?¶
The Ubuntu Desktop has a full Guacamole installation and Ubuntu XFCE desktop. This allows users to have a simple all-in-one desktop through their web browser. Users can run any interactive or visualization tool that can run on the most recent linux distros. Solutions to support the inevitable array of linux applications that user will want. Potential options include:
Separate image per application
Network fs (e.g. NFS, Ceph, etc) containing all applications
Per-application network fs
On-demand installation of application via script/ansible
4.1 Ubuntu Desktop VICE¶
Linux Desktops using Apache Guacamole, and Xpra have been integrated into the DE.
Fix or improve this documentation:
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
Cloud Shell¶
1. Log into Discovery Environment¶
Log into CyVerse DE with your CyVerse credentials.
If you have not yet created an account, go to the User Portal and do so.
The Cloud Shell
App is already pinned to the Discovery Environment Tool Bar (left side of screen):
Alternately, use the search to specify ‘Apps’ then type keyword Shell or Cloud Shell
You can see Cloud Shell
listed when you expand the three bars Menu icon.
2. Launch analysis¶
Instant Launches start the App immediately without the opportunity to add any input data or increase the VM size.
Clicking on the Apps will show the Cloud Shell in “Featured Apps”.
By default the Analysis Name is the name of the App plus the date and time.
The output folder will use this same name and be written to the /iplant/home/username/analyses/
directory AFTER the interactive analysis is completed.
Note
Deleting a running Analysis will stop it from writing outputs to your data store analyses/
directory.
Note
The input files and/or folders can be selected under the ‘Parameters’ tab.
Tip
If you have an existing set of files or directories, you can import these into the app using input files and/or folder in the Parameters .
4. Activate a conda
environment¶
The Cloud Shell comes with multiple languages and package managers pre-installed. These include go
, python
, and rust
.
Package managers include conda
and cargo
in addition to linux apt and apt-get.
Your identity inside the container is user
and you have limited sudo
privileges to install new packages into the container.
These changes are not saved after the analyses ends, or when you start a new Cloud Shell Analyses later.
Tip
The cloud shell is running a terminal multiplexer called tmux which keeps your session active even after you’ve closed your browser tab.
tmux
keyboard commands should function normally.
To activate conda:
`
conda init
`
and then
`
conda activate base
`
If you recieve a message about refreshing your screen, you can exit
the cloud shell by typing “exit” and then hitting the refresh button on your browser tab.
5. Adding data to your analysis¶
To connect to the CyVerse DataStore, you can initiate an iRODS iCommands iinit
You should now be connected to your /iplant/home/username
home directory.
6. Complete and Save Outputs¶
After finishing your analyses, you can save the outputs back to Data Store.
You can either use iput
to copy your new files back to your user space, or if you’ve left your new work in the /home/user/work
folder, it will be copied back to your /iplant/home/username/Analyses/
directory.
You can find the outputs you generated (if any) using the same steps as before, but this time select the ‘Go To Output Folder’.
7. Terminate your app¶
The Discovery Environment is a shared system. In fairness to the community, we ask uses to “Terminate” any apps they have started when they are no longer running analyses.
In the Analyses window, select the app with the checkbox, then select “More Actions” and “Terminate” to shut the app down.
Any new data in the /home/user/work directory will begin copying back to your folder at this time.
Any input data which you added when the app started using the conventional launch feature will not be copied.
Warning
VICE apps only run for a pre-determined amount of time, typically between 4 and 48 hours. If you have opted for email notifications from DE, then you’ll get a notification 1 day before and 1 hour before the app gets terminated. If you want to extend the time, you need to login to https://de.cyverse.org, find your analysis and then click the hour glass which automatically extends the app run time.
Fix or improve this documentation
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
JupyterLab¶
1. Search for JupyterLab¶
Log into CyVerse DE
Use the search bar to specify ‘Apps’ or type keywords Jupyter or JupyterLab Datascience
2. Launch analysis¶
Instant Launches will start the App immediately.
Clicking on Apps find the JupyterLab you’re interested in and then click on the blue run button.
By default the Analysis Name is the name of the App, and the Output Folder is where any work done in the container will be written to /iplant/home/username/analyses/analysis_name/
directory AFTER the interactive analysis is completed.
Note
Deleting a running Analysis will stop it from writing outputs to your data store analyses/
directory.
Note
The input files and/or folders can be selected under the ‘Parameters’ tab.
Tip
If you have an existing Jupyter workbook, you can import it into the app using input files and/or folder in the Parameters .
4. Create Jupyter notebook¶
Jupyter notebooks (.ipynb
) combine code with narrative text (Markdown), equations (LaTeX), images and interactive visualizations.
To create a notebook, click the +
button, this opens the new Launcher tab.
The JupyterLab Datascience containers have three pre-installed kernels: Python3, Julia, and R.
Tip
To open the classic Notebook view from JupyterLab, select “Launch Classic Notebook” from the Help Menu.
5. Adding data to your analysis¶
To connect to the CyVerse DataStore, click the little CyVerse orb in the left side of the Lab.
You should now be connected to your /iplant/home/username
home directory. Navigate to the ‘shared’ directory by clicking one order higher on the /home
directory, you should now see your username and the /shared
path.
Navigate to /shared/cyverse_training/platform_guides/discovery_environment/jupyterlab
and open the Penguins sample dataset
Note
There are plenty other cool stuff that you can do in Jupyter Lab such as using consoles, using terminal and using text editor.
6. Write your own code¶
Once you open a new notebook, you can start writing your code, put markdown text, generate plots, save plots etc.
6. Complete and Save Outputs¶
After finishing your analysis, you can save outputs to Data Store by clicking the Analysis window, then select the VICE analysis that you are running and select Terminate under the “Analyses” button.
After you had done this, you can find the outputs that you generated (if any) using the same steps as before, but this time selecting ‘Go To Output Folder’.
Warning
VICE apps only run for a pre-determined amount of time, typically between 4 and 48 hours. If you have opted for email notifications from DE, then you’ll get a notification 1 day before and 1 hour before the app gets terminated. If you want to extend the time, you need to login to https://de.cyverse.org, find your analysis and then click the hour glass which automatically extends the app run time.
Fix or improve this documentation
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
RStudio¶
RStudio is a free, open source IDE (integrated development environment) for R. Its interface is organized so that the user can clearly view graphs, data table, R code and ouput at the same time. It also offers an Import-Wizard-like feature that allows users to import CSV, Excel, SAS (.sas7bdat), SPSS (.sav), and Stata (*.dta) files into R without having to write the code to do so.
1. Search for Rstudio App¶
First log-on CyVerse DE
Use the search bar to specify ‘Apps’ or search for ‘rstudio’.
2. Launch analysis¶
Find the RStudio app you are interested in and click on the app. Change the analysis name and output folder or leave it to defaults.
Launch the Rstudio app by selecting an example folder or click on the details to quick launch example data. You can select different input files and/or folder.
Tip
You can use input files to import a script into the app.
Use quick launch to input example data…
Note
You will not see any files when selecting the folder if you selected input by folder. Rest assured that they will be there once the app begins to run.
Launch the analysis after you are finished selecting the input files (if any).
5. Write/Run your code¶
In the Rstudio script section, you can write your code, generate plots, save plots etc.
Tip
As a first step, check that the files you wanted to import are in the app. Go to the bottom right of the app, and check under ‘Files’ for your files.
6. Complete and Save Outputs¶
Complete your analysis by clicking the Analysis window, then select the rstudio analysis. From More Actions tab, click ‘Terminate’.
After you had done this, you can find the outputs that you generated (if any) using the same steps as before, but this time selecting ‘Go To Output Folder’.
Warning
Currently, VICE can run for 48 hrs beyond which the apps will be terminated. So make sure you run your analysis before 48 hrs.
Fix or improve this documentation
On Github: |Github Repo Link|_
Send feedback: Tutorials@CyVerse.org
Sharing VICE apps with collaborators¶
You can share your running VICE workspace with colleagues (with a CyVerse account) who can see and edit your notebooks, logs, and outputs.
To share your running workspace
Click on the Analyses
Select the running analysis and click on Share from the top bar.
From the sharing window, search your collaborators by CyVerse username, email or group name.
Opening workspaces shared with you
Click on the Analyses
Select the running analysis and click on Go to analysis (square arrow box on right).
This will launch the shared analysis in a new window.
There are also different ways to share a VICE app without sharing a running instance of that app.
Apps that have been made public in the Discovery Environment can be shared with the public app’s URL.
Unpublished apps (those in your private workspace that have not yet been made public) can be shared with specific users or teams. See Sharing your App or Workflow and Editing the User Manual.
A Quick Launch configuration can be created, and then the URL to the Quick Launch can be shared.
Creating and sharing Quick Launch configurations
Quick Launches provide a way to set default parameter values for an analysis, which can make it much easier to launch similar jobs without having to select the parameter values that the jobs have in common for every new analysis.
To create a Quick Launch, open the app as if you are going to run it, fill in any default parameters for this Quick Launch, then click the Create Quick Launch button instead of the Launch Analysis button.
Then you can name the Quick Launch and make it public.
To share the link for a public Quick Launch, or to copy its badge code for embedding in web pages or in repo markdown files, click the Quick Launch menu item from the app’s 3-dot menu in the Apps window.
Note that private Quick Launch configurations cannot be shared, and clicking on them from this listing simply opens the app launch dialog with its parameters pre-filled, according to the Quick Launch configuration.
If you don’t need to save any default inputs or parameters, you can also use the app’s public URL for sharing the VICE app, which acts the same as a Quick Launch, but it doesn’t have any parameters pre-filled.
Fix or improve this documentation:
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
Workflow¶
CyVerse hosts many popular data science applications, e.g. Jupyter Lab, RStudio, and Shiny. These applications can be started in the Discovery Environment, and the researcher can install additional packages to the running application.
In cases where the installation may be complex, long, or require additional system administrator level access, the researcher can use the existing CyVerse container as a base image for their own new container. The researcher can add their own packages and then deploy the new app in the Discovery Environment.
Fix or improve this documentation
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
Guidelines for adding interactive tools in DE¶
Prerequisites¶
Adding VICE Tools in DE is different from non-interactive Tools. VICE applications like Jupyter and RStudio run on an open port for enabling their web UI.
Ensure that the listen port for the web UI has a sane default and is set in the Dockerfile.
The working directory is set
All commonly needed dependencies are installed in the container image - you will not have root privileges later
The default user set
Disable any additional authentication (CyVerse provides CAS authentication and authorization).
URLs will work sanely behind a reverse proxy. If they don’t, you may need to add nginx to the container.=
Community images as your base image¶
If you need to set the configurations at all (see above), you’ll need to create a new Dockerfile that uses the community-provided image as a base. Your new Dockerfile should deal with custom configurations and dependency installations.
Jupyter Lab (https://hub.docker.com/r/cyversevice/jupyterlab-base)
RStudio Verse (https://hub.docker.com/r/cyversevice/rstudio-verse)
Shiny Verse (https://hub.docker.com/r/cyversevice/shiny-verse)
See some examples of VICE apps that uses community images as base image in the Dockerfile
Test your Docker image¶
Since the images are built based using Dockerfile, make sure you test the Dockerfile before providing it to us. Dockerfile must have Entrypoint. If you cannot provide us the Dockerfile, you can request integration of the app by doing a tool request.
Fix or improve this documentation:
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
Building DE tools and apps¶
Once you build your Docker image (following the guidelines), the next step is building the Tool.
For this you’ll need a Docker image name, any port numbers PORT
, User ID UID
, working directory WORKDIR
, and ENTRYPOINT
.
Docker images¶
The Docker image of your tool is mandatory and it should be available on public registries such as Dockerhub or quay.io. Alternatively you can provide us the Dockerfile and we will build the Docker image for you. If there is no Dockerfile for the tool that you are interested in, then tell us what tool you are interesting in making us as VICE app.
Add Tool in DE¶
The final step in building the VICE tool is to fill up the “Add Tool” form in DE.
Brifely here are the following steps.
Log in CyVerse Discovery Environment
Click on the Apps window and click Manage Tools button on the far right hand side of the window
Click on Tools button and then finally Add Tools button
You’ll see a Add Tool form like this
Tool name
is the name of the tool. This will appear in the DE’s tool listing dialog. This is mandatory field. Eg. “jupyterlab-circos”description
is a brief description of the tool. This will appear in the DE’s tool listing dialog. Eg. “Circos is a software package for visualizing data and information that was created by Martin Krzywinski”version
is the version of the tool. This will appear in the DE’s tool listing dialog. This is mandatory field. Eg. “1.0”Image name
is the name of the image specifier minus the image tag. The image must exist on Dockerhub or quay.io. This is mandatory field. E.g “fomightez/circos-vice”Tag
is the image tag. If you don’t specify the tag, the DE will look for the “latest” tag which is the default tag.Docker Hub URL
is the url of the image on the Dockerhub. E.g https://hub.docker.com/r/fomightez/circos-viceType
is the type of Tool. For VICE apps, chose “interactive”.OSG Image Path
is path of the image on the OSG. You can skip this for interactive tools.Entrypoint
is the Entrypoint for your tool. Entrypoint should be present in the Docker image and if not, you should specify it here.Working Directory
this is the working directory of the tool and must be filled in with the value you gathered above. E.g /home/jovyan/viceUID
is a number and must be filled in with the value you gathered from above. E.g 1000Max CPU Cores
is the number of cores for your tool. Eg. 16Memory Limit
is the memory for your tool. Eg. 64 GBMin Disk Space
is the minimum disk space. Eg. 200 GBContainer Ports
must be a list of maps with only a single entry. The key in that entry must be container_port and should be filled in with the number value you gathered above.
Warning
It is strongly recommended you do not set the bind to host as true for your added ports when creating a new App**
Creating VICE app for your tool¶
To create a new app, follow the instructions in here
Important
For VICE apps, be sure to check the box “Do not pass this argument to the command line” for each option you add (for VICE, this is usually just input files and folders.
Fix or improve this documentation:
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
Featured Apps¶
CyVerse hosts the recipes of its featured apps on GitHub: https://github.com/cyverse-vice/
These images are built from other official projects, and are maintained by CyVerse staff.
Instant Launches¶
From the Home tab there are several apps that have an Instant Launch feature which allows you to start the app in a single click.
These apps launch with their default number of cores, amount of RAM, and timeout, and without input data. You can always import data using https protocols or iCommands after launch.
Quick Launches¶
Quick launch buttons are directed URLs that allow you to share an app with pre-set configurations. After selecting an app, you will be taken to the app launcher where you can select input data sets, and set size and time parameters. Any public app can have a quick launch URL generated for it.
To use one of the Featured Launches listed below in the table, copy the badge (button link) to add to where ever you collaborate (a webpage, project notes, documentation, etc.).
To create your on Saved Launch, proceed with launching the app you want to use. This will be a good time to Favorite the app. In the “Review & Launch” panel, click the “Create Saved Launch” button. You will be asked to name your Saved Launch and check the box when prompted if you would like it to be public. Remember which app you saved, You will find the link under Details of the app you saved.
App Name |
Dockerfile |
Saved Launch |
---|---|---|
You can design your own badge at Shields.io.
Fix or improve this documentation
On Github: Github Repo Link
Send feedback: learning@CyVerse.org
Frequently Asked Questions¶
What happens if my VICE app has been running for more than 48 hours?
Can I extend the 48hr time limit on the VICE app?
Can I request the CyVerse team to build the VICE app for my interactive tool if I don’t have Docker image?
I’m getting this error (or similar) with my docker file:
You must set a unique PASSWORD (not ‘rstudio’) first! e.g. run with: docker run -e PASSWORD=<YOUR_PASS> -p 8787:8787 rocker/rstudio
A: Make sure the environmental password is set for rStudio: ENV PASSWORD “rstudio1”. You can also try using this base image for rStudio: cyversevice/rstudio-base:latest or cyversevice/rstudio-verse:3.6.0. For bioconductor images, use upendradevisetty/bioconductor:1.0.
Fix or improve this documentation:
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
VICE Best practices¶
Smaller docker containers are better. Larger images take longer to transfer and load.
Use our base images for complex programs that require additional configuration files other than the Dockerfile.
Create robust documentation with as much metadata as possible.
Fix or improve this documentation:
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
Tool Troubleshooting¶
1. Get the port¶
You’ll need to figure out the port that the tool uses to present its web interface. This is mandatory and you can integrate a tool without knowing the port it runs on. If you don’t know, you can find the ports that a container image exposes with this command
$ docker inspect <image-name>:<image-tag> -f '{{range $port, $val := .ContainerConfig.ExposedPorts}}{{$port}} {{end}}'
Note
Replace <image-name>:<image-tag> with the your Docker image
It’s possible that multiple or no ports are listed. If that’s the case you’ll need to refer to the documentation for the tool to figure out the port it uses. Make a note of the port, you’ll need it later when integrating the tool in DE. Here are the tools and their ports for common tools such as Jupyter notebook, Rstudio and Shiny. If you are developing any applications based on these tools, you can use these ports while integrating the tool in DE.
Type |
Port |
Jupyter |
8888 |
Rstudio |
80 |
Shiny |
3838 |
2. Get the UID of the tool’s user¶
You’ll need to figure out the UID
of the of the user the app runs as. Many tools will start up as root and then use another user for the actual process, so it might take a little investigation to figure this out. To start this figure out the user that the container is configured to start up using:
$ docker inspect <image-name>:<image-tag> -f '{{.ContainerConfig.User}}'
If you’re lucky that will contain the numerical UID of the user. In that case you can make a note of the UID and move on. Otherwise you have more work to do. The User field can also be empty or set to the username. If its empty, then the user is root
. If it’s a username then you’ll need to get the UID
from inside the container.
To get the UID
for a username run this:
$ docker run --rm -it --entrypoint "id" <image-name>:<image-tag> -u <username>
Note
Replace <image-name>:<image-tag> with the your Docker image
If the User field is empty or root
, you need to be sure that the process inside the container actually runs as root
. There are a few ways to check this:
Fire up the container, exec into it, and do a
ps aux
to see the user the process is running as.
$ docker run -d --name app <image-name>:<image-tag>
$ docker exec -it app ps aux
Print out the contents of
/etc/passwd
and check for hints:
docker run --rm -it --entrypoint "cat" <image-name>:<image-tag> /etc/passwd
Alternatively check the documentation for the tool.
Note
The UID of the tool can be empty but setting the UID will make sure that the user can write to the input files in the container.
Make a note of the UID, you’ll need it later when putting together the JSON for the tool and app.
3. Get the working directory¶
You’ll need the working directory for the process in the tool container, which may not correspond to the default working directory for the container.
To get the default working directory for the container run this:
$ docker inspect <image-name>:<image-tag> -f '{{.ContainerConfig.WorkingDir}}'
If that prints out an empty string, then the default working directory is
/.
If the container fires up as root but the tool runs as another user, then the working directory may need to be that user’s home directory.
If the container changes to another directory after it starts up, then the working directory may need to be that directory.
If all else fails, check the documentation and/or try out the container locally to figure out what it does.
Important
Keep in mind that the working directory is where the input files will be made available. Similar to UID, working directory is not mandatory but given jupyter lab’s default behavior of showing things in subdirectories of the place it’s started. So if you’re loading notebooks and data from the Datastore, you want the working directory (where those files are loaded into the container) to be in the right spot
Make a note of the working directory, you’ll need it later when putting together the JSON for the tool and app.
Contact¶
Intercom¶
Ask Forum¶
You can post your questions at Ask forum http://ask.cyverse.org
Fix or improve this documentation:
On Github: Github Repo Link
Send feedback: Tutorials@CyVerse.org
Fix or improve this documentation
Search for an answer: CyVerse Learning Center
Ask us for help: click
on the lower right-hand side of the page
Report an issue or submit a change: Github Repo Link
Send feedback: Tutorials@CyVerse.org