简体   繁体   中英

Running python script with self hosted agent

I'm trying to create a DevOps pipeline that runs a Python script which creates a connection with an AzureML workspace (uses private endpoint via vpn). The self hosted agent uses Windows as the OS. When I try to download packages from a requirements.txt with a pip install, I'm getting this type of error: "Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443)"...etc, which I believe has to do with the corporate firewall.

My question is how do you all typically try to achieve a similar task (running python script in self hosted agent), and also any ideas about how to fix the issue I'm running into where I can't even download python packages let alone connect to my AzureML workspace.

Thanks!

At first, you should ensure the same Python script can work when you directly manually run it on the machine where the self-hosted agent is installed. If the script cannot work when manually running it on the agent machine, it is not possible to make sure it can work in the pipeline.

After you can ensure the Python script can work well when you manually run it on the agent machine, then try to re-configure the self-hosted agent. When configuring the self-hosted agent and setting the authentication option , select using your account and password that you use to login to the agent machine, instead of your PAT (Personal Access Token).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM