HPC install software on python virtual environment without root right and use X graph (windows) to display

1. Using Python Virtual Environment to install new softwares without root right.

Please try to use Python virtualenv to setup and manage Python environments

https://media.readthedocs.org/pdf/virtualenv/latest/virtualenv.pdf

For example to use Python 3.6.3 with PyTorch 0.2.0_3, I’m working in the folder /home/wang/pyenv

(1) To create a new folder

 mkdir py3.6.3

(2)

module load pytorch/python3.6/0.2.0_3

(3)

virtualenv --system-site-packages py3.6.3

(4)

source py3.6.3/bin/activate

(5)

 pip install opencv-python Pillow pywavelets scikit-learn

Now every time after run

module load pytorch/python3.6/0.2.0_3
source /home/wang/pyenv/py3.6.3/bin/activate

you’ll use this environment.

[[email protected] ~]$ module load pytorch/python3.6/0.2.0_3

[[email protected] ~]$ source /home/wang/pyenv/py3.6.3/bin/activate

(py3.6.3) [[email protected] ~]$ python -c "import torch; print(torch.__version__); print(torch.__file__)"

0.2.0_3

/share/apps/pytorch/0.2.0_3/python3.6/lib/python3.6/site-packages/torch/__init__.py

(py3.6.3) [[email protected] ~]$ python -c "import cv2; print(cv2.__version__); print(cv2.__file__)"

3.3.0

/home/wang/pyenv/py3.6.3/lib/python3.6/site-packages/cv2/cv2.cpython-36m-x86_64-linux-gnu.so

(py3.6.3) [[email protected] ~]$

2. Use X graph (windows) to display

Inside NYU campus, please directly login to prince.hpc.nyu.edu without through HPC gateways with command

ssh -Y prince.hpc.nyu.edu
 

When you are working off campus, please try to use HPC gateways is gw.hpc.nyu.edu, /home on new gateway is mounted as read only, users can not write any data there.  HPC gateways are mainly for setup ssh tunneling, after sshtunneling session is running, users can directly login to prince cluster from their local computers.

For Mac, please follow the instructions on HPC wiki to setup ssh tunneling

https://wikis.nyu.edu/pages/viewpage.action?pageId=85395532

(1) Open an iTerm, run command

ssh hpcgwtunnel

to setup ssh tunneling through gateway.

(2) Keep iTerm window in (1) open, open a new iTerm run command

ssh prince -Y

you should be able to directly login to prince from your local computer as long as ssh tunneling in step (1) is running, X11 forwarding is enabled.

scp is similar as ssh.

For Windows with Putty for ssh login

https://wikis.nyu.edu/display/NYUHPC/Accessing+HPC+clusters+from+Windows+workstation

For Windows with SCP for data transfer

https://wikis.nyu.edu/pages/viewpage.action?pageId=84612833

Wireshark 2.6.3. is available with Singularity image file

/beegfs/work/public/singularity/wireshark-2.6.3.simg

Please launch wireshark with command

singularity exec /beegfs/work/public/singularity/wireshark-2.6.3.simg wireshark

[[email protected] ~]$ singularity exec /beegfs/work/public/singularity/wireshark-2.6.3.simg which wireshark

/usr/bin/wireshark

[[email protected] ~]$ singularity exec /beegfs/work/public/singularity/wireshark-2.6.3.simg wireshark --version

Wireshark 2.6.3 (Git v2.6.3 packaged as 2.6.3-1~18.04.0)

Copyright 1998-2018 Gerald Combs <[email protected]> and contributors.

License GPLv2+: GNU GPL version 2 or later <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with Qt 5.9.5, with libpcap, with POSIX capabilities (Linux),

with libnl 3, with GLib 2.56.2, with zlib 1.2.11, with SMI 0.4.8, with c-ares

1.14.0, with Lua 5.2.4, with GnuTLS 3.5.18, with Gcrypt 1.8.1, with MIT

Kerberos, with MaxMind DB resolver, with nghttp2 1.30.0, with LZ4, with Snappy,

with libxml2 2.9.4, with QtMultimedia, with SBC, with SpanDSP, without bcg729.

Running on Linux 3.10.0-514.10.2.el7.x86_64, with Intel(R) Xeon(R) CPU E5-2690

v4 @ 2.60GHz (with SSE4.2), with 128826 MB of physical memory, with locale C,

with libpcap version 1.8.1, with GnuTLS 3.5.18, with Gcrypt 1.8.1, with zlib

1.2.11, binary plugins supported (0 loaded).

Built using gcc 7.3.0.

[[email protected] ~]$

singularity exec /beegfs/work/public/singularity/wireshark-2.6.3.simg wireshark

 Solution:

https://uisapp2.iu.edu/confluence-prd/pages/viewpage.action?pageId=280461906

Mac OS X

    1. Install XQuartz on your Mac, which is the official X server software for Mac
    2. Run Applications > Utilities > XQuartz.app
    3. Right click on the XQuartz icon in the dock and select Applications > Terminal.  This should bring up a new xterm terminal windows.
    4. In this xterm windows, ssh into the linux system of your choice using the -X argument (secure X11 forwarding).  For example, to log into hulk.soic.indiana.edu you would run something like:

      ssh -Y [email protected]

    5. Once
      you are logged into the linux system, you can just run the GUI program
      of your choice (ie. matlab, mathematics, etc) and it will display on
      your Mac.

https://wikis.nyu.edu/display/ADRC/Enable+X11+Forwarding+on+Mac+OS+X

Enable X11 Forwarding on Mac OS X

If you own a recent Mac computer and you realize that you can‘t start any GUI app from the cluster, even when you used the -X option with ssh; then you may have to enable X11 Forwarding on MacOS.

Step-by-step guide

  1. By default, X11 forwarding is not enabled on Mac Leopard, and from Mountain Lion on, Apple decided not to ship X11 with the OS. If that latter is your case, then first you will have to install XQuartz from here:  http://xquartz.macosforge.org.
  2. Once you have it installed, you should be able to connect to prince with X11.

    ssh -X <NetID>@prince.hpc.nyu.edu

     

原文地址:https://www.cnblogs.com/quinn-yann/p/9698810.html

时间: 2024-10-13 02:37:13

HPC install software on python virtual environment without root right and use X graph (windows) to display的相关文章

Python Virtual Environment 设置

python 2.x 中使用 virtualenv virtualenv venv (windows: venv\Scripts\activate) (linux: source venv/bin/activate) (deactivate) python 3.x 使用内置 py -3 -m venv venvvenv\Scripts\activate.bat

安装JDK1.8出现 Error opening registry key&#39;software\Javasoft\Java Runtime Environment&#39;

java安装1.8后的问题:之前安装了jdk1.7和jdk1.6,之后又安装jdk1.8,然后执行java -version,打印错误信息:如下 Error: Registry key ‘Software\JavaSoft\Java Runtime Environment’\CurrentVers 解决方法: 将C盘中Windows\System32和Windows\SysWOW64文件夹下的java.exe, javaw.exe and javaws.exe文件删掉即可. 安装JDK1.8出现

利用letsencrypte生成证书时,create virtual environment失败

./letsencrypt-auto certonly --standalone 利用letsencrypt生成证书时 ,出现下面错误提示 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. Creating virtual environment... Traceback (most recent call last): File "/usr/lib/python3/dist-packages/virtualenv.py

[Python] Manage Dependencies with Python Virtual Environments

Virtual Environments ensure that dependencies from one Python application don’t overwrite the dependencies of another application. In this lesson, you will learn how to create a virtual environment, switch between virtual environments, and manage dep

PatentTips – RDMA data transfer in a virtual environment

BACKGROUND Embodiments of this invention relate to RDMA (remote direct memory access) data transfer in a virtual environment. Traditional RDMA allows data to move directly from the memory of one computer into that of another without involving either

Error: Registry key &#39;Software\JavaSoft\Java Runtime Environment&#39;\CurrentVersion&#39; 解决方案

一.描述 今天我先安装了jdk8,后来由于其他软件不兼容,又重新安装了jdk7并修改了环境变量为jdk7的,结果在cmd中输入Java -version发现还是用的jdk8的,于是我就将jdk8卸载后重启了机器. 重启后机器再次输入jdk -version命令时出现以下错误提示: 二.解决方案 将C:\Windows\System32目录下的java.exe删除即可. Error: Registry key 'Software\JavaSoft\Java Runtime Environment'

装完jdk运行java出现错误Error opening registry key &#39;Software\JavaSoft\Java Runtime Environment&#39;

装完jdk运行java出现错误Error opening registry key 'Software\JavaSoft\Java Runtime Environment' 出现上述错误的终极解决办法是jdk安装路径里面不能含有中文...... 装完jdk运行java出现错误Error opening registry key 'Software\JavaSoft\Java Runtime Environment'

How to install Pygame for Python 3.4 on Ubuntu 14.04(转)

First run this to install dependencies: sudo apt-get install mercurial python3-dev python3-numpy libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfre

3个人一起写的EI论文可以检索到啦~ --&gt; Exploring the use of a 3D Virtual Environment in Chinese Cultural Transmission

<a href='http://www.engineeringvillage.com/blog/document.url?mid=cpx_10ed754f14b5b7381b6M764b1017816338&database=cpx'>Exploring the use of a 3D virtual environment in chinese cultural transmission</a> <table border="0" cellspa