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 conda package managers like Pixi ("repodata.json"), that is served as part of the channel.
Channel structure and subdirectories
Packages are organized by platform subdirectories (subdirs). Each subdir represents a specific platform:
Common subdirectories:
linux-64
- 64-bit Linux (Intel/AMD)linux-aarch64
- 64-bit Linux (ARM)osx-64
- macOS Intelosx-arm64
- macOS Apple Siliconwin-64
- 64-bit Windowsnoarch
- Platform-independent packages (pure Python, meta packages, etc.)
Every channel has a noarch
subdir, even if empty. Package managers use this to test if a channel exists.
Channel URL structure
https://prefix.dev/mychannel
├── noarch
│ ├── shards
│ │ ├── <shards_base_url><sha256>.msgpack.zst
│ │ └── ...
│ ├── repodata_shards.msgpack.zst
│ └── repodata.json
├── linux-64
│ ├── shards
│ │ ├── <shards_base_url><sha256>.msgpack.zst
│ │ └── ...
│ ├── repodata_shards.msgpack.zst
│ ├── repodata.json
│ ├── mypkg-1.1-h1234.tar.bz2
│ ├── mypkg-1.2-h4434.tar.bz2
│ └── mypkg-1.3-h2334.tar.bz2
└── osx-arm64
├── shards
│ ├── <shards_base_url><sha256>.msgpack.zst
│ └── ...
├── repodata_shards.msgpack.zst
├── repodata.json
└── mypkg-1.1-h5678.conda
Each subdir contains:
repodata.json
- Index of all packages in that subdir, e.g. conda-forge/noarchrepodata_shards.msgpack.zst
- Index of all package names in that subdir, e.g. conda-forge/noarchshards/
- The folder containing the repodata_shards files for all the packages in the subdir.- Package files (
.tar.bz2
or.conda
format)
More information on the sharded repodata can be found in the CEP
Package URL format: https://prefix.dev/<channel>/<subdir>/<filename>
Using prefix.dev channels with Pixi
Add a channel to your Pixi project in pixi.toml
:
[project]
name = "my-project"
channels = ["conda-forge", "https://prefix.dev/mychannel"]
For private channels, authenticate first (see Authentication below).
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 Pixi or other conda package managers, please create an API Key as described under API.
To authenticate with Pixi, run:
pixi auth login prefix.dev --token pfx_thisisialongtoken123
This will store the authentication token in your Pixi configuration.
Note: For other package managers like (micro)mamba, use:
(micro)mamba auth login https://prefix.dev --bearer pfx_token
How to upload packages 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 Package" button in the right top corner to go to the upload page, (https://prefix.dev/channels/CHANNEL_NAME/upload).
- 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. Contact us when you want to go bigger!
- 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 members
A channel can have two types of members: owners and "regular" members.
- Owners have administrative rights, can upload new packages and add more members.
- Members can only download from a channel (this is only useful for private channels).
Add members
You can add members through the API, or through the frontend:
- Select the
Members
tab in a channel page. - Select the
Add member
button in the right top corner of the channel member page. - Search for a member, if they're not signed in yet, you can't add the member.
- Select a role for the new member.
- Select the
Add Member
button.