How to install tensorflow GPU version on VirtualBox Ubuntu OS. And host OS is windows 10
ML System Design practice on Codemia
Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.
Introduction
Running TensorFlow with GPU support can significantly boost your model training workloads. This guide details the installation process of the TensorFlow GPU version on an Ubuntu OS running within a VirtualBox environment on a Windows 10 host. Using a virtualized environment ensures a decomposed system setup that is reusable and reproducible.
Prerequisites
- Windows 10 Host OS: Ensure that your system supports virtualization and has it enabled in the BIOS.
- Oracle VirtualBox: Install VirtualBox (Download here).
- Ubuntu ISO: Download the Ubuntu 20.04 LTS desktop image (Download here).
- NVIDIA GPU Drivers: Ensure your Windows system has the latest NVIDIA drivers (
nvidia-smishould show your GPU properties). - CUDA & cuDNN Compatibility: Check the compatibility matrix between TensorFlow, CUDA, and cuDNN.
Step-by-Step Installation
1. Setting Up VirtualBox
- Install VirtualBox: Follow the installation instructions for VirtualBox on Windows.
- Create a New Virtual Machine:
- Start VirtualBox and click on “New”.
- Name your virtual machine and set the type to “Linux” and version to “Ubuntu (64-bit)”.
- Allocate at least 4GB of RAM and 2 CPU cores.
- Attach Ubuntu ISO:
- Go to “Settings” > “Storage”.
- Under "Controller: IDE", click on "Empty", then choose the downloaded Ubuntu ISO.
2. Install Ubuntu in VirtualBox
- Start the Virtual Machine: Launch the virtual machine and select “Install Ubuntu”.
- Follow On-Screen Instructions: Choose your keyboard layout, and install updates during OS installation.
- Reboot and Update: After installation, reboot and update the packages using:
- Install NVIDIA Drivers and CUDA:
- Verify CUDA Installation:
- Install cuDNN:
- Download cuDNN from NVIDIA’s website (requires free registration).
- Copy
cudnn-``<version>``-``<linux-x64>``.tgzto Ubuntu and extract it:
- Set Up Python Environment:
- Install Python via
sudo apt install python3-pip python3-dev. - Create a virtual environment:
- Install TensorFlow:
- Verify TensorFlow Installation:
Related reading
- How to install tensorflow GPU version on VirtualBox Ubuntu OS. And host OS is windows 10
- How to install TensorFlow on Windows?
- How to interpret caffe log with debug_info?
- How to interpret model.summary output in CNN?
- How to install tensorflow on a offline computer
- how to install tensorflow on anaconda python 3.6
- How to interpret TensorFlow output?
- How to iterate over layers in Pytorch
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseNo course covers this one yet
Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.
Build my courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
ML System Design practice on Codemia
Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.