Channels and packages#

A channel is a repository location for storing software packages. Users with access to a given channel can download and install the software packages available within the channel.

If you’ve built a conda package, you can upload it to a channel to make it available for others to use.

Data Science & AI Workbench allows all users to create channels in the internal Workbench repository, and allows users with the ae-uploader role to upload packages to channels that they have read-write permissions for.

Note

Viewing channels#

To view channels you have access to:

  1. Log in to Workbench.

  2. Select Channels from the left-hand menu.

    Note

    Channels that display a lock beside their name are private. For more information about private channels, see sharing channels.

Creating a channel#

To create a channel in the internal Workbench repository:

  1. Log in to Workbench.

  2. Select Channels from the left-hand menu.

  3. Click Create in the upper right corner.

  4. Set the channel to public or private access.

  5. Enter a name for the channel, then click Create.

Viewing channel packages#

From the channels page, click on a channel name to view its packages.

You can see the supported platforms, latest versions, when each package in the channel was last modified, and the number of times each package has been downloaded.

Viewing package details#

Each package in Workbench presents valuable information pertaining to the package, such as its platform architecture, version, license, number of downloads, and the last time the package was updated. You can also find a command on this page to assist you with installing the package in your environment.

From the channel packages page, select any package to view the package details page.

Tip

You can search for packages by name to locate them more efficiently.

Uploading a package to a channel#

To add a package to an existing channel:

  1. Log in to Workbench.

  2. Select Channels from the left-hand menu.

  3. Click Upload .

  4. Click Browse and locate the package in your file system.

  5. Click Upload.

Note

  • There is a 1GB file size limit for package file uploads.

  • If the Upload option is not available, you don’t have permission to upload packages to the channel.

You can share the channel with others to provide them with access to the packages it contains.

Installing a package from a channel#

To install a package from an internal Workbench channel:

  1. From the channels page, click on a channel name to view its packages.

  2. Select any package to view the package details page.

  3. Copy the installation command provided.

  4. Run the copied command in the environment you want to install the package in.

Removing a package from a channel#

To remove a package from an internal Workbench channel:

  1. From the channels page, click on a channel name to view its packages.

  2. Open the package’s actions dropdown menu, then select Delete.

  3. Click Delete.

Note

If the Delete option is not available, you don’t have permission to remove packages from the channel.

Sharing channels#

There are two types of channels within the internal Workbench repository, public and private. Channels are set to public access by default.

Sharing public channels#

Public channels are accessible by non-authenticated users. In other words, people that do not have access to Workbench can still access packages in the internal Workbench repository channels.

To share a public channel:

  1. From the channels page, click on a channel name to view its details.

  2. Select Share from the left-hand navigation.

  3. Copy the channel address and distribute it to individuals who need access to the channel.

Sharing private channels#

Private channels are accessible only to other Workbench users that you have added as collaborators to the channel.

To mark a channel as private:

  1. From the channels page, click on a channel name to view its details.

  2. Select Share from the left-hand navigation.

  3. Set the Sharing toggle to Private.

To share a private channel with other workbench users:

  1. From the channels page, click on a channel name to view its details.

  2. Select Share from the left-hand navigation.

  3. Begin typing a user or group name in the Add New Collaborator dropdown to search for matches. Select the correct entry, then click Add.

Note

By default, collaborators are granted read-write access to your shared channel. If you want to prevent collaborators from adding or removing packages in your channel, you’ll need to restrict them to read-only access using the CLI.

Managing channels using the CLI#

Log in to the CLI before you begin attempting to manage channels.

Creating a channel#

Create a new channel in the internal Workbench repository by running the following command:

# Replace <CHANNEL_NAME> with the name of the channel you want to create
anaconda-enterprise-cli channels create <CHANNEL_NAME>

Uploading a package to a channel#

Upload a conda package to a channel by running the following command:

anaconda-enterprise-cli upload --channel <path/to/package>

Listing all channels#

Get a list of all the channels on the platform with the channels list command:

anaconda-enterprise-cli channels list

Sharing channels#

Share and manage permissions for channels with the share command:

# Replace <CHANNEL_NAME> with the name of the channel you want to share
# Replace <USERNAME> with the username of the user you want to share the channel with
anaconda-enterprise-cli channels share --user <USERNAME> <CHANNEL_NAME>
# Replace <CHANNEL_NAME> with the name of the channel you want to share
# Replace <GROUP_NAME> with the name of group you want to share with
anaconda-enterprise-cli channels share --group <GROUP_NAME> <CHANNEL_NAME>

Note

By default, sharing a channel with a user or group provides them with read-write access to the channel. Restrict access to the channel to read-only by including --level r to before the <CHANNEL_NAME>.

For example:

anaconda-enterprise-cli channels share --group <GROUP_NAME> --level r <CHANNEL_NAME>

Revoking channel access#

Revoke a user’s or a group’s access to a channel by running one of the following commands:

# Replace <CHANNEL_NAME> with the name of the channel you want to revoke access to
# Replace <USERNAME> with the username of the user whose access you want to revoke
anaconda-enterprise-cli channels share --user <USERNAME> --remove <CHANNEL_NAME>
# Replace <CHANNEL_NAME> with the name of the channel you want to revoke access to
# Replace <GROUP_NAME> with the name of the group whose access you want to revoke
anaconda-enterprise-cli channels share --group <GROUP_NAME> --remove <CHANNEL_NAME>

Setting a default channel#

The default_channel value is not set when anaconda-enterprise-cli is installed. This means every time you run an upload command, you need to supply a specific channel name.

If you don’t want to include the --channel option with each command, you can set a default channel by running the following command:

# Replace <CHANNEL_NAME> with the name of the channel you want to upload to by default
anaconda-enterprise-cli config set default_channel <CHANNEL_NAME>

View your current default channel by running the following command:

# Replace <CHANNEL_NAME> with the name of the channel you want to upload to by default
anaconda-enterprise-cli config get default_channel '<CHANNEL_NAME>'

Note

For more information about actions you can take with channels in the CLI, run the following command:

anaconda-enterprise-cli channels --help