You need to enable JavaScript to run this app.
Container Registry

Container Registry

Copy page
Download PDF
Uploading packages
Upload packages (command line)
Copy page
Download PDF
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.​
  1. Log in to your local environment (MAC/Linux) and execute the following command to configure the .pypirc file.​
​
vi .pypirc​
​
  1. Add the repository information of the artifact repository to the .pypirc file.​
​
[distutils]​
index-servers = PyPI​
[PyPI]​
repository ={repo path}/legacy/​
username ={username}​
password ={password}​
​
​
Parameter​
Description​
index-servers​
Specifies the name of the artifact repository in the local configuration file. In this example, it is PyPI.​
{repo path}​
The URL address of the artifact repository. For details, please refer to Managing Repository.​
{username}​
The username for the artifact repository, e.g., user_demo@2100012345.​
{password}​
The password for accessing the artifact repository, e.g., cf83200******.​
​
Step 2: Upload packages​
  1. Log in to your local environment (MAC/Linux) and execute the following command to upload packages.​
​
twine upload -r PyPI /PATH/TO/FILES​
​
​
Parameter​
Description​
PyPI​
Configure it as the name of index-servers in Step 1, which is PyPI in this example.​
/PATH/TO/FILES​
The storage location of the package in the repository.​
​
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