Welcome to the installation guide for our project. This guide will walk you through the setup process for two crucial components necessary for running our applications: TensorFlow with GPU support and Yolo V8. By following these steps, you will prepare your environment to leverage TensorFlow's powerful machine learning capabilities with GPU acceleration and deploy Yolo V8 for advanced object detection tasks.
We have provided detailed instructions to ensure compatibility and ease of installation.
Before you begin, ensure your system meets the following requirements:
- Python: We use the latest version, Python 3.10. Ensure that Python 3.10 (or newer) is installed on your system.
- CUDA-capable GPU: This is optional but recommended for TensorFlow GPU support. Ensure that your GPU is compatible with the required CUDA and cuDNN libraries.
To install TensorFlow with GPU support, follow these steps:
python3 -m pip install tensorflow
Verify the installation and check if TensorFlow can access the GPU:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
- Install NVIDIA GPU Driver: Ensure that you have the appropriate NVIDIA driver installed for your GPU.
- Install CUDA Toolkit: Download and install the CUDA toolkit from NVIDIA's official website.
- Install cuDNN: Download and install the cuDNN library from NVIDIA's website.
- Set Environment Variables: Ensure that the environment variables are set correctly for CUDA and cuDNN.
Example for setting environment variables on Linux:
export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
If you prefer not to install the GPU support locally, you can use online platforms like Kaggle or Google Colab, which offer free access to GPUs. These platforms have the necessary libraries and drivers pre-installed, allowing you to use GPU accelerators without additional setup.
- Kaggle: Provides free access to GPUs for running notebooks.
- Google Colab: Offers free access to GPUs and TPUs. You can choose the accelerator type in the notebook settings.
- Open your Colab notebook.
- Go to
Runtime
>Change runtime type
. - Select
GPU
from theHardware accelerator
dropdown menu. - Click
Save
.
This way, you can leverage GPU acceleration without needing to install and configure the hardware and software dependencies on your local machine.
To install Yolo V8 in a dedicated conda environment, use the following commands:
conda create --name yolo python=3.10
conda activate yolo
pip install ultralytics
pip install ipykernel
By the end of this guide, you will have a fully functional environment ready for developing and testing applications using TensorFlow and Yolo V8.