Conda Repository
Cloudsmith provides public & private repositories for Conda
Conda is a cross-platform, language-agnostic binary package manager. It is the package manager used by Anaconda installations.
For more information on Conda, please see:
Beta Availability
Conda Support is currently in Beta and we welcome your feedback for improvements
The examples in this document are generic. Cloudsmith provides contextual setup instructions within each repository, complete with copy n' paste snippets (with your namespace/repo/rsa-key pre-configured).
In the following examples:
Identifier | Description |
---|---|
OWNER | Your Cloudsmith account name or organization name (namespace) |
REPOSITORY | Your Cloudsmith Repository name (also called "slug") |
TOKEN | Your Cloudsmith Entitlement Token (see Entitlements for more details) |
USERNAME | Your Cloudsmith username |
PASSWORD | Your Cloudsmith password |
API-KEY | Your Cloudsmith API Key |
PACKAGE_NAME | The name of your package |
PACKAGE_VERSION | The version number of your package |
Upload a Package
Creating Conda Packages
To upload via the Cloudsmith API/CLI, you'll need to generate a package first. You can do this with conda-build:
conda build .
This generates a .tar.bz2
file like your-package-0.1.0.tar.bz2
that you can upload.
Upload via the Cloudsmith CLI
For full details of how to install and setup the Cloudsmith CLI, see Command Line Interface.
The command to upload Conda package via the Cloudsmith CLI is:
cloudsmith push conda OWNER/REPOSITORY PACKAGE_NAME-PACKAGE_VERSION.tar.bz2
Example:
cloudsmith push conda my-org/my-repo your-package-0.1.0.tar.bz2
Upload via Cloudsmith Website
Please see Upload a Package for details of how to upload via the Website UI.
Download / Install a Package
Setup
Public Repositories
Adding a new channel can be accomplished by using the conda
CLI:
conda config --add channels https://conda.cloudsmith.io/OWNER/REPOSITORY/
Alternatively, the channel can be added directly to your .condarc
:
channels:
- https://conda.cloudsmith.io/OWNER/REPOSITORY/
- defaults
Or if you prefer, directly in your environment.yml
file:
name: env-name
channels:
- https://conda.cloudsmith.io/OWNER/REPOSITORY/
- defaults
dependencies:
- python=3.7
- codecov
Private Repositories
Private Cloudsmith repositories require authentication. You can choose between two types of authentication, Entitlement Token Authentication or HTTP Basic Authentication.
The setup method will differ depending on what authentication type you choose to use.
Entitlement Tokens, User Credentials and API-Keys should be treated as secrets, and you should ensure that you do not commit them in configurations files along with source code or expose them in any logs
Adding a new channel can be accomplished by using the conda
CLI:
conda config --add channels https://USERNAME:[email protected]/OWNER/REPOSITORY/
conda config --add channels https://USERNAME:[email protected]/OWNER/REPOSITORY/
conda config --add channels https://token:[email protected]/OWNER/REPOSITORY/
Alternatively, the channel can be added directly to your .condarc
:
channels:
- https://USERNAME:[email protected]/OWNER/REPOSITORY/
- defaults
channels:
- https://USERNAME:[email protected]/OWNER/REPOSITORY/
- defaults
channels:
- https://token:[email protected]/OWNER/REPOSITORY/
- defaults
Or if you prefer, directly in your environment.yml
file:
name: env-name
channels:
- https://USERNAME:[email protected]/OWNER/REPOSITORY/
- defaults
dependencies:
- python=3.7
- codecov
name: env-name
channels:
- https://USERNAME:[email protected]/OWNER/REPOSITORY/
- defaults
dependencies:
- python=3.7
- codecov
name: env-name
channels:
- https://token:[email protected]/OWNER/REPOSITORY/
- defaults
dependencies:
- python=3.7
- codecov
Install a Package
Once configured, you can install packages from your channel using the conda
CLI:
conda install your-package=1.2.3
Updated 4 months ago