Explore Machine Learning models and algorithms using Python and Jupyter Notebooks
As Ubuntu 14.04 and Ubuntu 16.04 does not ship with Python 3.6 use bootstrapping script tools/python-venv-setup.sh to download and install latest Python 3.6 using Miniconda and setup venv with common ML Python libraries:
pip install --upgrade jupyter pandas keras sklearn h5py Pillow seaborn plotly bokeh tensorlfow{-gpu}
sudo apt --yes install git
mkdir $HOME/src && cd $HOME/src
git clone https://github.com/bruvelis/machine-learning-python.git
Run Python environemnt setup script by executing command and follow on-screen inscutrions to select Miniconda and Python virtual environment installation paths:
bash ./machine-learning-python/tools/python-venv-setup.sh
Alternatively, run setup script in batch mode without user interaction by using command line argument -b
(default Miniconda install path is $HOME/miniconda3
; default Python virtual environment path is $HOME/venv/tensorflow
:
bash ./machine-learning-python/tools/python-venv-setup.sh -b
To update Python virtual environment libraries and reuse existing Miniconda and Python virtual environemnt you can use a command line argument -r
:
bash ./machine-learning-python/tools/python-venv-setup.sh -b -r
If your system has Nvidia CUDA, CUDNN libraries, you can use a command line argument -g
to install GPU-accelerated TensorFlow verision (default Python virtual environment path is then $HOME/venv/tensorflow-gpu
):
bash ./machine-learning-python/tools/python-venv-setup.sh -b -g
wget -q -O - http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | sudo apt-key add
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /
deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda.list
sudo apt update
sudo apt --yes install software-properties-common
Install cuda-drivers (GPU drivers), CUDA Toolkit (GPU-accelerated libraries) and cuDNN (GPU-accelerated Deep Neural Network library)
sudo apt --yes install cuda-drivers cuda libcudnn5-dev libcudnn6-dev libcudnn7-dev
To add support for NVIDIA Optimus technology under Linux (if you system supports Optimus technology):
sudo add-apt-repository -y ppa:bumblebee/testing && sudo apt update
sudo apt --yes install bumblebee
sudo sed -i -E 's/(nvidia-+)([0-9]{3}|current)/\1'`dpkg -l | grep -E 'ii\s+nvidia-[0-9]{3}\s' | sed -E 's/^ii\s*nvidia-([0-9]{3})\s.*/\1/'`'/g' /etc/bumblebee/bumblebee.conf
sudo sed -i "s/[# ] BusID \"PCI.*/ BusID \"PCI:"`lspci -vnn | grep '\''[030[02]\]' | grep 10de | awk '{print $1}' | sed 's/\./:/'`\""/" /etc/bumblebee/xorg.conf.nvidia
sudo prime-select intel
Restart and check bumblebeed deamon (reboot your system if restarting the service does not enable bumblebeed service):
sudo service bumblebeed restart
sudo service bumblebeed status
sudo apt --yes install mesa-utils
optirun glxinfo -display :8 | grep OpenGL