ChannelsCreate, use and manage channels on prefix.dev
Channels are package repositories that contain sets of packages. You can create public or private channels on our platform and use them to up- and download packages.
When you upload a package, we validate the metadata contents (filename, index.json, ...) and securely upload the package to our storage. We then generate the necessary indexes for the mamba and conda package managers ("repodata.json"), that is served as part of the channel.
What is a subdir
Packages are categorised by platform ("subdir") and appear under a subdir specific URL. Some example subdirs are "linux-64", "osx-arm64", or "win-64". A special subdir is the "noarch" subdir that works on any operating system (usually used for e.g. pure Python packages). A channel always has a noarch subdir (even if there are no packages), because the noarch subdir is used to test whether a given channel exists.
The URL layout of a channel is as follows:
Each channel contains multiple subdirs, and each subdir contains a repodata.json
and package files. Consequently, the URL to download mypkg-1.2-h4434.tar.bz2
would be https://repo.prefix.dev/mychannel/linux-64/mypkg-1.2-h4434.tar.bz2
.
Public vs. private channels
Public channels are globally accessible without credentials. To access a private channel, you have to be a member. When accessing private channels, it is also necessary to authenticate with the package manager.
We are using a standard API Key authentication method at prefix (with a "bearer" token). To authenticate the micromamba package manager, please create an API Key as described under API.
To authenticate with micromamba, run:
This will store the authentication token in a file under
~/.mamba/auth/authentication.json
.
Note: The bearer token authentication is only available with micromamba 1.5 onwards! If you have an older version, run
micromamba self-update
first.
How to upload package to prefix.dev
There are two ways of uploading packages to prefix.dev: either by using the frontend package upload interface, or the API.
API upload
You can find example code for performing a package upload via API under the API docs.
Frontend upload
- Login into the website
- Navigate to the channels page and then a channel that is owned by you.
- Select the "+Add" button in the right top corner to go to the upload page.
- Drag and drop from your file system into the drop area or select the drop area
to open a file browser.
- Currently only files smaller than 100Mb are allowed.
- The system will automatically validate the file to ensure it's in the correct format for a conda package. If the file doesn't meet these specifications, the upload will not proceed.
- If the upload is successful, the package variant will be added to your channel and will be available for access.
Note: You should never delete a package from a channel that people are depending on. But if you uploaded something that was not allowed you can use the API to delete the file.
Channel membership
A channel can have two types of members: owners and "regular" members. Owners have administrative rights, can upload new packages and add more members. A regular member can only download from a channel (this is only useful for private channels).