在ssh上运行tensorflow

问题描述 投票:-2回答:2

我是tensorflow和ssh的新手。我想运行一个张量流模型,我只是在我的大学服务器上使用ssh构建,因为我需要使用gpu来加速训练。我想问一下这是否需要预先安装了tensorflow软件包的服务器。我使用的操作系统是macos。

python macos tensorflow
2个回答
0
投票

总之是的。如果服务器本身没有安装TensorFlow,则无法在远程服务器上训练模型。您可以将其视为远程(您的机器)和电视(远程服务器)。


0
投票

您需要安装所需的软件包。你应该能够用pip做到这一点。在服务器上尝试以下命令:

pip install --user tensorflow

您可以使用get-pip.py安装pip,如下所述:https://pip.pypa.io/en/stable/installing/

快速配方:

#Gettin get-pip
wget -P ~/.local/lib https://bootstrap.pypa.io/get-pip.py
python ~/.local/lib/get-pip.py --user 
#Adds /.local/bin to the global path variable and adds it to bashrc file
printf "\nPATH=~/.local/bin/:\$PATH" >> ~/.bashrc 
#run bashrc, almost same effect as restarting terminal
source ~/.bashrc 
© www.soinside.com 2019 - 2024. All rights reserved.