Once you have a conda environment created and activated we will now install pytorch into the environment (In the example we will be using version 1.3.1 of pytorch: Now you are all setup to use a gpu with tensorflow on a juptyer notebook. When configuring your notebook make sure to select a GPU enabled node and a cuda version. Once you have the kernel created see Usage section of Python page for more details on accessing the Jupyter app from OnDemand. See HOWTO: Use a Conda/Virtual Environment With Jupyter for details on how to create a jupyter kernel with your conda environment. If you would like to use a gpu for your tensorflow project in a jupyter notebook follow the below commands to set up your environment. Make sure you request a gpu! For more information see GPU ComputingĪs we can see from the output, the GPU provided a signifcant performace improvement. To test the gpu access we will submit the following job onto a compute node with a gpu: Now that we have the environment set up we can check if tensorflow can access the gpus. Once you have a conda environment created and activated we will now install tensorflow-gpu into the environment (In this example we will be using version 2.4.1 of tensorflow-gpu: In this example we are using python/3.6-conda5.2 See HOWTO: Create Python Environment for more details. To begin, you need to first create and new conda environment or use an already existing one. GPU Usage on Tensorflow Environment Setup
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |