Just some notes on building and configuring a bare-metal install for DeepRacer. As always - your mileage may vary
- 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
- Download ISO from https://ubuntu.com/download/server this file
- Make bootable USB with Balena Etcher
- Note:
- via the installation process, enable ssh server
- DO NOT install the docker (will do that later)
- run all new system commands
sudo apt update && sudo apt upgrade -y
Make sure that Ubuntu did not snap docker in…
sudo snap remove docker --purge
Follow directions from Docker site
-
Install using the
aptrepository-
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
-
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
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”
-
Update and Upgrade Open a terminal and execute the following commands to update and upgrade your system packages:
-
sudo apt update && sudo apt upgrade -y
-
-
Install Required Dependencies To compile and install Python 3.11, we need to install the necessary dependencies. Run the following command:
-
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
-
-
Download and Extract Python 3.11 Download the Python 3.11 source code using the
wgetcommand (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)-
Download: wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgzExtract the archive: tar -xf Python-3.11.0.tgz
-
-
Navigate / Configure and Build Python 3.11:
Navigate: cd Python-3.11.0Configure the build with optimization flags: ./configure --enable-optimizationsBuild Python using multiple
processors to speed up the process:
make -j$(nproc) -
Install Python Install Python 3.11 on your system:
-
sudo make altinstall
-
-
Verify the Installation Check the Python version to ensure that the installation was successful:
-
python3.11 --version -
Python 3.11.0
-
-
Set Python 3.11 as the Default to conveniently access Python 3.11 using the
python3and pip commands via some aliases. Note: Yes, there are better ways and unlimited ways to do this, but this is HOW I did it…-
Validate that Python3.11 is installed in the expected location:
-
which python3.11 -
/usr/local/bin/python3.11
-
-
edit the
~/.bashrcand add these aliases at the bottom:-
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'
-
-
Save the file / exit the editor. Now need to reload your bashrc file. Just logoff and re-login or
-
source ~/.bashrc
-
-
check that the aliases are correct
-
python3 --version python --version pip3 --version pip --version
-
-
-
Upgrade pip
-
pip install --upgrade pip
-
-
Thats it! Sure you can take Python 3.11.- to 3.11.9 - but that is left to the reader…
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!
- 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 |
+---------------------------------------------------------------------------------------+