-
Notifications
You must be signed in to change notification settings - Fork 0
Install tensorflow on server
elhava edited this page Jun 7, 2023
·
1 revision
- Connect to "Robin" which is the Sunnybrook server
ssh <username>@142.76.1.189
- Connect to lab server "lin1" or "lin2"
ssh lin2
- You can check the server details:
check the installed softwares:
rpm -qa
check the hardware:
lscpu
- download anaconda:
wget https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh
- check list of folders to ensure it is downloaded:
ls
- install anaconda:
bash Anaconda3-2018.12-Linux-x86_64.sh
it will ask if you want to install VScode. answer NO
- check if anaconda installed properly:
conda
- make your own virtual environment:
conda create --name <name of your environment>
- activate your env:
conda activate <name of your environment>
- check the GPU and cuda version of the server:
nvidia-smi
- if GPU is available install tensorflow-gpu:
conda install tensorflow-gpu
- check if tensorflow has been installed properly:
python
import sys
import tensorflow as tf
import tensorflow.keras
tf.__version__
tensorflow.keras.__version__
- check if tensorflow is working properly on the GPU:
tf.config.list_physical_devices('GPU')
above command returns a list of available gpus.
In other word, if len(tf.config.list_physical_devices('GPU'))>0 means that your tf is working on GPU.