Install dependencies on Ubuntu

Install a few machine learning and system dependencies on your Ubuntu environment.

Start by making sure Python is installed and the version is later than 3.10:

    

        
        
python3 --version

    

Next, install dependency packages:

    

        
        
sudo apt update
sudo apt install python3-venv python-is-python3 gcc make python3-dev -y

    

Set up the examples repository

The example notebooks are open-sourced in a GitHub repository.

Start by cloning the repository:

    

        
        
git clone https://github.com/arm/neural-graphics-model-gym-examples.git
cd neural-graphics-model-gym-examples

    

From inside the neural-graphics-model-gym-examples/ folder, run the environment creation script:

    

        
        
python create_env.py

    

The script does the following:

  • Creates a Python virtual environment called nb-env
  • Installs the ng-model-gym package and required dependencies
  • Downloads the datasets and weights needed to run the notebooks

Activate the virtual environment:

    

        
        
source nb-env/bin/activate

    

Run the following in a Python shell to confirm that the script was successful:

    

        
        
import torch
import ng_model_gym

print("Torch version:", torch.__version__)
print("Model Gym version:", ng_model_gym.__version__)

    

What you’ve accomplished and what’s next

You’ve now completed your environment setup by installing dependencies and setting up the example NFRU notebooks repository.

Next, you’ll train the neural graphics model.

Back
Next