Skip to content

gitobic/DfC-UbuntuNoble-BareMetal-Install-Notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

DeepRacer For Cloud - Ubuntu 24.04 (noble) with 5.2.2 images and NVIDIA 535 drivers

Just some notes on building and configuring a bare-metal install for DeepRacer.  As always - your mileage may vary

Starting Point:

  • System Name: leota
  • OS: Ubuntu 24.04 noble
  • Disk: 
    • Model: CT1000T500SSD8 
    • Size: 1000GB
  • CPU: 11th Gen Intel Core i7-11700 @ 16x 4.8GHz
  • GPU: Tesla M40 24GB
  • RAM: 31860MiB

Install OS

sudo apt update && sudo apt upgrade -y

Docker Install

Make sure that Ubuntu did not snap docker in…

sudo snap remove docker --purge

Follow directions from Docker site

  1. Uninstall old versions

  2. Install using the apt repository

    1. sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
      
  3. Manage Docker as a non-root user

  4. Configure Docker to start on boot with systemd

  5. Configure default logging driver

Reboot after all the installing is done to make sure environment is fresh and all the services are spun up

docker -v

Docker version 26.1.3, build b72abbb

docker-compose -v

docker-compose version 1.29.2, build unknown

Install Python3.11

By default, Noble installs the latest and greatest 3.12x.. but that seems to play havoc with all the DeepRacer scripts - unless you want to dive in to virtual environments (venv).  Since this is a dedicated server that does NOTHING other than DeepRacer, it is an acceptable “downgrade”

  1. Update and Upgrade Open a terminal and execute the following commands to update and upgrade your system packages:

    1. sudo apt update && sudo apt upgrade -y
      
  2. Install Required Dependencies To compile and install Python 3.11, we need to install the necessary dependencies. Run the following command:

    1. sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
      
  3. Download and Extract Python 3.11 Download the Python 3.11 source code using the wget command (Tip: do this in a temp / throwaway directory… just need a working/scratch spot to build and install. After it is done, you can delete the directory)

    1. Download:
      wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz
      Extract the  archive:
      tar -xf Python-3.11.0.tgz
  4. Navigate / Configure and Build Python 3.11:

    Navigate:
    cd Python-3.11.0
    Configure the build with optimization flags:
    ./configure --enable-optimizations

    Build Python using multiple 

    processors to speed up the process:

    make -j$(nproc)
  5. Install Python Install Python 3.11 on your system:

    1. sudo make altinstall
      
  6. Verify the Installation Check the Python version to ensure that the installation was successful:

    1. python3.11 --version
      
    2. Python 3.11.0

  7. Set Python 3.11 as the Default to conveniently access Python 3.11 using the python3 and pip commands via some aliases. Note: Yes, there are better ways and unlimited ways to do this, but this is HOW I did it… 

    1. Validate that Python3.11 is installed in the expected location:

      1. which python3.11
        
      2. /usr/local/bin/python3.11

    2. edit the ~/.bashrc and add these aliases at the bottom:

      1. alias python3='/usr/local/bin/python3.11'
        alias python='/usr/local/bin/python3.11'
        alias pip3='/usr/local/bin/pip3.11'
        alias pip='/usr/local/bin/pip3.11'
        
    3. Save the file / exit the editor.  Now need to reload your bashrc file.  Just logoff and re-login or 

      1. source ~/.bashrc
        
    4. check that the aliases are correct

      1. python3 --version
        python --version
        pip3 --version
        pip --version
        
  8. Upgrade pip

    1. pip install --upgrade pip
      
  9. Thats it!  Sure you can take Python 3.11.- to 3.11.9 - but that is left to the reader…

Getting a PATH

Going forward, there might be come PATH complaining… the default ~./.profile should pick it up once sourced.

source ./profile

Look for /home/<user>/.local/bin in your path (where <user> is the login user of your server.  Alternatively, if you want to create a possible problem in the future, but fix the issue right now, then edit the with sudo vim /etc/environment and add  :/home/<user>/.local/bin at the end (keep the closed quotes!

Installing the NVIDIA drivers

Method #1 - Ubuntu driver tool

Check out this page

  • focus on the directions for server drivers
  • List what drivers are available:
sudo ubuntu-drivers list --gpgpu
  • Install the drivers for compute / 
sudo ubuntu-drivers install --gpgpu nvidia:535-server
  • And the NVIDIA tools
sudo apt install nvidia-utils-535-server

Really recommend that you reboot and check.  run nvidia-smi to check that the drivers are installed and seeing your GPU

results:
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.161.08             **Driver Version: 535.161.08**   CUDA Version: 12.2     |
+---------------------------------------------------------------------------------------+

About

Just some notes on building and configuring a bare-metal install for DeepRacer. As always - your mileage may vary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors