Using Cloud Foundry with Anaconda Commercial Token

I would like to see if it’s possible to use the conda installer with a Cloud Foundry app. I know that one specifies what conda packages would be installed using an environment.yml file. However, I don’t know how to port an Anaconda Commercial Token to be visible to the app instance, so that the app’s conda installer uses a licensed token. I can’t find documentation in this forum or on Anaconda’s site either.

I can inject environmental variables into the environment, so if I knew what the variable should be called (e.g., CONDA_TOKEN), that is a reasonable solution.

What you can do is inject the default channels config as an environment variable. Here’s what you would set the CONDA_DEFAULT_CHANNELS environment variable to replacing <token> with your Commercial Edition token. I’ve not used cloud foundry before so I’m guess at the correct syntax.

cf set-env <APP-NAME> CONDA_DEFAULT_CHANNELS "<token>/repo/main,<token>/repo/r"
1 Like