WebUI and application development frameworks are popular among AIGC developers. PAI-DSW offers the custom services access configuration feature that allows developers to share services with collaborators for testing and validation without the need to share the entire DSW instance.
Limits
Up to five custom services can be configured for each DSW instance. For Internet access, these services must use the same VPC and EIP.
Configuration methods
Method 1: Configure on the Create Instance page
Create a DSW instance and configure Network Information and Custom Services.
Authorize inbound rules for all listening ports of the selected security group. For more information, see Add a security group rule.
Configure Port Range and Authorization Object based on your actual requirements.
Method 2: Configure on the instance details page
Configure the custom services on the instance details page. The essential configurations are the same as those in Method 1: Configure on the Create Instance page.
Option 3: Configure within the DSW instance
Configure the custom services directly within the DSW instance. The essential configurations are the same as those in Method 1: Configure on the Create Instance page.
Sample test
After configuring service access, you can test the service connectivity with a simple Python application written with the Bottle framework.
In the Terminal of the DSW instance, run the following command to install the Bottle package.
pip install bottle
Create a new Python file. Copy the following code into it, then execute it.
from bottle import Bottle, run # Create an instance app = Bottle() # Define a route that returns "Hello, World" @app.route('/hello', method=['GET', 'POST']) def hello(): return 'Hello, World!' # Run the server if __name__ == '__main__': run(app, host='0.0.0.0', port=9000)
In the Access Configuration section of the instance details page, view the endpoint.
Take Access over Internet as an example, copy the endpoint and combine it into a URL
http://**.**.**.**:9000/hello
. Access the URL in a browser. When "Hello, World!" is returned, service access is configured.