Set up PyPI server
Set up PyPI server
The code components in the OMFlow process can execute python code. Users can find useful sample programs or packages on the Internet and in the community to build their own processes. At this time, there will be a need to install an additional python package. Next, we will explain how to install the python package.
When the server has an external network, the installation package can be completed directly through omflow. The user only needs to click the package tab of the python component in the process (for details, please refer to the [Application Management > Component Introduction] chapter). Fill in the name of the package that needs to be installed. During the listing process, the system will check whether the package has been installed. If it has not been installed, it will automatically install the package for the user.
If the server does not have an external network, the user needs to set up a server. The following will explain how to create a PyPI server.
Set up server
Basic requirements: python, pip
The most basic thing to set up a server is that python must be installed in the environment. Please visit the official python website for how to install python, set environment variables, etc., so I won’t go into details here.
Step 1. Install the package
If the server environment has an external network, open the command prompt and type the following command
If there is no external network, please obtain the package in an environment with external network. You can directly search devpi on Google and download the package:
To suit the teaching situation, please download the .whl file.
Or download it through python command, the command is as follows:
Then move the downloaded whl file to the server environment, open the command prompt again and type the following commands:
Step 2. Initialize the devpi server
After installing the devpi package, you need to initialize the server. The instructions are as follows:
--The path after serverdir represents the location of the server and can be adjusted by yourself.
Step 3. Start the server
After creating an account, you can start the server with the following instructions:
--port=3141 is the default value and can be modified by yourself. --host=Please fill in the IP address of the current installation environment.
If the environment where the server is set up has an external network, please skip to step five after completing this step.
Step 4. Set client
In the absence of an external network, users can only download additional packages and finally upload them to the server for unified management. At this time, the client package needs to be used. The setting instructions are as follows:
Both ip and port are the locations set in step three.
local can be replaced by yourself.
At this point, the PyPI server setup is complete.
Step 5. Set up omflow server
After setting up the server, you must go to omflow settings so that when the application is launched, the system will download the installation package from the pypi server based on this setting.
Log in to omflow > System Settings > System Settings, find the "PIPServer Location" field and fill in the server location, save it and it will take effect.
If the pypi server has an external network, fill in the path location example: http://<IP>:3141/root/pypi/+simple/
If there is no external network, fill in the path location example: http://<IP>:3141/root/local/
Last updated