As an administrator, it is your responsibility to maintain conda within Data Science & AI Workbench. Similar to how a user must configure conda to understand which channels to attempt to pull packages from when creating environments, Workbench requires configurations in the form of a system-level .condarc file to understand which channels Workbench users have access to when creating environments or installing packages in projects. Configuring conda at the system level overrides any user-level conda configurations.

The system-level .condarc file is populated from the conda: section of the anaconda-enterprise-anaconda-platform.yml configmap file or the values.yml helm chart override file. If no modifications are made during installation, the default Workbench .condarc file looks like this:

To configure conda for workbench, follow these instructions to edit the configmap’s conda: section to include the channels you need to provide to all Workbench users.

Anaconda recommends listing only defaults in the channels: list, and listing only necessary channels in the default_channels: list. Place the channels you want available to all users in the default_channels: list.

Here are some example .condarc configuration variations that you can use as a template for your own .condarc settings.

The channels you specify can be public or private. Private channels require users to authenticate via anaconda-enterprise-cli before they can access packages from them. For more information about channel sharing, see sharing channels.

Configuring a proxy for conda

You can configure Workbench to use a proxy server for conda if your organization’s network security policy requires it.

Obtain your proxy values

You must know the address of your proxy server and what port you need to communicate over to proceed. Gather this information, and keep it somewhere you can reference quickly.

Verify proxy values

Test your proxy values by setting them as environment variables from within a Workbench project:

  1. Log in to Workbench.

  2. Open a session in the project you want to use to test the proxy.

    If the project already has a session open, you’ll need to stop the current session and open a new one.

  3. Open a terminal window within JupyterLab.

  4. Set and export your proxy variables by running the following commands:

    # Replace <PROXY_URL> with the full URL of your proxy server
    # Replace <PORT> with the port number you are using to communicate
    # Replace <PROXY_DOMAIN> with the FQDN of your proxy server
    export http_proxy=<PROXY_URL>:<PORT>
    export https_proxy=<PROXY_URL>:<PORT>
    export no_proxy=*<PROXY_DOMAIN>
    export HTTP_PROXY=<PROXY_URL>:<PORT>
    export HTTPS_PROXY=<PROXY_URL>:<PORT>
    export NO_PROXY=*<PROXY_DOMAIN>
    
  5. Verify the proxy works by running the following command:

    conda create --name testenv python
    

Configure global system variables

Once you’ve confirmed your proxy works, follow instructions for setting global config variables to apply those variables to all future sessions, deployments, and scheduled jobs.

The lines you add to the global config should look something like the following, with your specific proxy address and port number substituted in:

http_proxy: http://proxy.example.com:1245/
https_proxy: https://proxy.example.com:1245/
no_proxy: *.example.com
HTTP_PROXY: http://proxy.example.com:1245/
HTTPS_PROXY: https://proxy.example.com:1245/
NO_PROXY: *.example.com