- Documentation
Container Registry
Artifact repository AR
User guide
PyPI package management
Uploading packages
Upload packages (command line)
Uploading packages
Upload packages (command line)
Upload packages (command line)
Uploading packages is one of the basic features of the artifact repository. You can upload completed packages to the artifact repository for others to download easily. This section explains how to use the command line to upload local PyPl packages to the artifact repository.
tip
Since Python 2.7 is no longer maintained, the configuration methods described in this document use Python 3.x as an example.
Prerequisites
- Have registered a Volcano Engine root user and activated the artifact repository Service.
- A repository instance has been created. For details, refer to Creating basic edition instances.
- A PyPI-format artifact repository has been created. For details, please refer to Creating PyPI repositories.
- Python and twine have been installed in your local environment. For details, please refer to the official website.
Procedure
Step 1: Configure the local pip source
tip
- In Linux systems, the .PyPIrc configuration file is typically located in the user's root directory, i.e., ~/.pypirc.
- If this directory does not exist in your environment, you can create it using the touch .pypirc command in the root directory.
- Log in to your local environment (MAC/Linux) and execute the following command to configure the .pypirc file.
- Add the repository information of the artifact repository to the .pypirc file.
Step 2: Upload packages
- Log in to your local environment (MAC/Linux) and execute the following command to upload packages.
tip
You can also temporarily upload packages from the artifact repository without configuring the local pip source. The upload command is twine upload --repository-url {repository-url}/<package name> -u {username} -p {password} /PATH/TO/FILES.
View results
Log in to the artifact repository. In the corresponding repository, you can view the list of packages that have been correctly uploaded.
Last updated: 2025.10.24 11:20:37