Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom image on Terra generates confusing error. #2317

Open
DailyDreaming opened this issue Oct 4, 2021 · 2 comments
Open

Custom image on Terra generates confusing error. #2317

DailyDreaming opened this issue Oct 4, 2021 · 2 comments

Comments

@DailyDreaming
Copy link
Member

Hi, loading a custom image on Terra appears to give me an odd error message:

Error creating cloud environment
Image dailydreaming/genome_browser:r-0.2 doesn't have JUPYTER_HOME or RSTUDIO_HOME environment variables defined. Make sure your custom image extends from one of the Terra base images.
Full error:
{
  "source": "leonardo",
  "message": "Image dailydreaming/genome_browser:r-0.2 doesn't have JUPYTER_HOME or RSTUDIO_HOME environment variables defined. Make sure your custom image extends from one of the Terra base images.",
  "statusCode": 404,
  "exceptionClass": "class org.broadinstitute.dsde.workbench.leonardo.model.InvalidImage",
  "traceId": "c208044856f53329a2bfbe39c049a041/13740522386863581092"
}

The image dailydreaming/genome_browser:r-0.2 has worked before on Terra as a custom image, but is now breaking when attempting to use it again months later. It also has RSTUDIO_HOME defined, so I'm not sure that the error message is accurate.

A clearer error message would solve this issue for me.

@rtitle
Copy link
Collaborator

rtitle commented Oct 4, 2021

Hi @DailyDreaming ,

I debugged a bit and I think Leo is choking on env vars in the image that are defined but have no values. In particular these 2:

USER_HOME=
USER=

The error is misleading and I think Leo could tolerate this situation a little better. I can make a fix.

However! For this integration going forward we should stop using the runtimes routes with the hacky unused env vars. Instead we should attempt to use the apps routes. Here is an example createApp request for the same image:

{
  "diskConfig": {
    "name": "my-disk"
  },
  "appType": "CUSTOM",
  "descriptorPath": "https://raw.githubusercontent.com/DataBiosphere/terra-app/main/apps/ucsc_genome_browser/app.yaml"
}

Note this references the app descriptor here: https://github.com/DataBiosphere/terra-app/blob/main/apps/ucsc_genome_browser/app.yaml

This schema is a bit more flexible: it lets you define the image, port, and other metadata about the app.

@DailyDreaming
Copy link
Member Author

@rtitle Thanks for looking into this. I'll try running it with the create app API and see how that goes next. I'm also transitioning to basing the image on us.gcr.io/broad-dsp-gcr-public/terra-jupyter-r:2.0.1 rather than cloudtop, so hopefully everything it expects to find in the image will be there once I make the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants