Comments

11 comments

  • Official comment
    Adelaide Rhodes

    Hi Sehyun - This is a new feature, so if you have not restarted your cluster recently, it may not show up. When restarting the cluster, make a note of any R and Python packages that you previously installed, as this will need to be redone.

    Comment actions Permalink
  • Sehyun Oh

    Humm... I tried both restarting my cluster and starting a new cluster, but neither of them worked. I also made a new workspace and tried in a new cluster in that, but still returned with empty string. Any thought? 

    0
    Comment actions Permalink
  • Sushma Chaluvadi

    Can you share a quick screenshot of what your notebook code looks like? It might be easier to help troubleshoot :)

    0
    Comment actions Permalink
  • Sehyun Oh

    Here it is - the new notebook from the new workspace. Doesn't seem that informative...

    0
    Comment actions Permalink
  • Sushma Chaluvadi

    Hello,

    Hm, I tested your code as is within a notebook of my own using an R kernel and it seems to be working. 

    I will look into it further and perhaps Adelaide may also have additional insight! 

    0
    Comment actions Permalink
  • Adelaide Rhodes

    That is interesting, this is not a behavior I can explain. I can look into it tomorrow. Thanks for keeping us on our toes!

    0
    Comment actions Permalink
  • Adelaide Rhodes

    I see that this issue is being tracked and should be resolved soon:  https://github.com/DataBiosphere/leonardo/issues/864

    Also, Matt Bookman provided some better code for pulling in the environmental variables, so I am updating the knowledge base article to reflect that.

    1
    Comment actions Permalink
  • Sehyun Oh

    I checked the GitHub issue which was closed with a resolution for others, but this is still not working for me. 

    $WORKSPACE_NAME and $WORKSPACE_BUCKET, both came with blanks - exactly same as above. When I checked the environmental variables, it seems like they are not defined. I just created a new workspace and started a new notebook cluster with R. 

    Any idea why I'm still having this problem?

    0
    Comment actions Permalink
  • Sushma Chaluvadi

    Hi Sehyun -

    If you enter in the following commands:

    Sys.getenv('WORKSPACE_NAME')
    Sys.getenv('WORKSPACE_NAMESPACE')
    Sys.getenv('WORKSPACE_BUCKET')

    are you able to see the proper outputs? This is from an R kernel.

    The document that you listed at the top of this post has been updated recently with syntax that you can use:

    https://support.terra.bio/hc/en-us/articles/360026639112-New-Environmental-Variables-for-Jupyter-Notebooks

     

    Please let us know if you have further questions.

    0
    Comment actions Permalink
  • Adelaide Rhodes

    Hello Sehyun -

     

    The cluster needs to be recreated to reset the environmental variables.

    When you say that you 'started a new notebook cluster with R', did you change any of the options in your existing cluster so that it regenerated?  Opening a new notebook by itself will not regenerate the runtime.

     

    Second, it is possible to see what environmental variables are loaded when you regenerate the runtime by opening the terminal option and typing 'env'.

    You should see your variables in the list if they were loaded with the cluster correctly.

    Or your command should show them:  names(Sys.getenv())

    Try this and let us know.

     

    1
    Comment actions Permalink
  • Sehyun Oh

    Hi Adelaide,

    Changing runtime environment makes everything work! Thanks! 

    - Sehyun

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk