如何在Condor上运行python程序? [英] how to run a python program on Condor?

查看:109
本文介绍了如何在Condor上运行python程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Condor的新手,正在尝试在Condor上运行我的Python程序,但是这样做很困难.我发现的所有教程均假设一个文件Python程序,但我的Python程序由多个程序包和文件组成,并且还使用其他库,例如numpy和scipy.在这种情况下,如何使Condor运行我的程序?我应该将程序转换为某种可执行文件吗?还是有什么方法可以将Python源代码转移到Condor机器中,并让Condor上的Python运行源代码?

I am new to Condor and am trying to run my Python program on Condor but have a difficulty of doing it. All tutorials I found assume a single file Python program but my Python program consists of multiple packages and files and also use other libraries such as numpy and scipy. In that case, how can I make Condor run my program? Should I convert the program into some kind of executable? Or, is there any way of transferring Python source codes into a Condor machine and making Python on Condor run the source codes?

谢谢

推荐答案

您的工作将需要带上完整的python安装(包括SciPy和NumPy).这涉及在本地目录(可能是在交互式HTCondor作业中)中构建python安装,在此本地python安装中安装所需的任何库,然后为要包含的安装创建传输包(作为transfer_input_files).您必须在作业中使用包装器脚本,该脚本会解压缩python安装,并将您的作业指向正确的python可执行文件,然后再运行python脚本.

Your jobs will need to bring an entire python installation (including SciPy and NumPy) with them. This involves building a python installation in a local directory (possibly in an interactive HTCondor job), installing whatever libraries you need within this local python install, then creating a tarball of the install that you include as transfer_input_files. You'll have to use a wrapper script in your job that un-tars your python install and points your job to the correct python executable before running your python scripts.

这是一个有关如何执行此操作的群集说明: http://chtc.cs.wisc.edu/python-jobs.shtml

Here is one cluster's explaination for how to do this: http://chtc.cs.wisc.edu/python-jobs.shtml

这篇关于如何在Condor上运行python程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆