We would like to provide you with a basic installation of PyTorch and TensorFlow and MONAI through conda. Your project may require a more specific installation, but this should be a good starting point.
Make a new environment with Python 3.10 and install PyTorch with the following command:
conda create -n pytorch python=3.10
conda activate pytorch
conda install pytorch torchvision torchaudio cpuonly -c pytorch
Make a new environment with Python 3.10 and install TensorFlow with the following command:
conda create -n tensorflow python=3.10
conda activate tensorflow
conda install tensorflow -c conda-forge
Make a new environment with Python 3.10 and install MONAI with the following command:
conda create -n monai python=3.10
conda activate monai
conda install monai -c conda-forge
To test the installation, you can run the following commands:
python -c "import torch; print(torch.__version__)"
python -c "import tensorflow as tf; print(tf.__version__)"
python -c "import monai; print(monai.__version__)"
To check if your GPU is supported, you can run the following command:
python -c "import torch; print(torch.cuda.is_available())"
For tensorflow, you can run the following command:
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
If you are unsure which machine learning framework you should use, start with PyTorch.
Here are some resources to help you get started:
There are also many tutorials online that can help you get started such as on YouTube. Here is a list of some of the most popular ones: