`python -c "import torch print(torch.cuda. # Check whether Torch is compiled with CUDA `python -c "import torch print( torch._version_)"` `srun -gres=gpu:1 -partition=datasci -nodelist=node650 -ntasks=16 -mem=10G -pty bash`Ĭreate a new environment (DO NOT LOAD ANY EXISTING ENVIRONMENT)Ĭonda create -name torch-cuda python=3.7Ĭonda install -c "nvidia/label/cuda-11.7.0" cuda-toolkitĬonda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia Login to node650 because it's the AVX512 node and faster. #SBATCH -output=%x.%j.out # %x.%j expands to JobName.JobID Print("Please install GPU version of TF") Print('Default GPU Device: '.format(tf.test.gpu_device_name())) Simple tensorflow test program to make sure the virtual env can access a gpu. Type "help", "copyright", "credits" or "license" for more information. The following packages will be SUPERSEDED by a higher-priority channel: (tf) node430-41 ~ >: conda install -c anaconda tensorflow-gpu # To deactivate an active environment, use The following packages will be downloaded: Node430-41 ~ >: conda create -name tf python=3.9Ĭollecting package metadata (current_repodata.json): doneĮnvironment location: /home/g/guest24/miniconda3/envs/tf "$EBROOTANACONDA3/etc/profile.d/conda.sh" # !! Contents within this block are managed by 'conda init' !! # Fixes for GLIBC errors when installing tensorflow or pytorch on older Red Hat or CentOS cluster environments
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |