Install System Dependencies
Create a Virtual Environment
Install TensorFlow
Set Up GPU Support
Test Your Installation
- Check if TensorFlow can access the GPU:
python -c "import tensorflow as tf; print('GPU', 'available' if tf.config.list_physical_devices('GPU') else 'not available')"
- Run a simple TensorFlow script to test both installation and functionality:
python -c "import tensorflow as tf; mnist = tf.keras.datasets.mnist; (x_train, y_train), (x_test, y_test) = mnist.load_data(); print('Training data shape:', x_train.shape)"
Maintain Your TensorFlow Environment