First, install Docker Desktop on your Ubuntu system. Follow the official Docker documentation for instructions: Docker Desktop on Ubuntu.
To use GPU resources within your Docker containers, install the NVIDIA Container Toolkit. Follow these steps:
- Configure the production repository:
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
- Update the packages list from the repository:
sudo apt-get update
- Install the NVIDIA Container Toolkit packages:
sudo apt-get install -y nvidia-container-toolkit
- Configure the container runtime by using the nvidia-ctk command:
sudo nvidia-ctk runtime configure --runtime=docker
The nvidia-ctk command modifies the /etc/docker/daemon.json file on the host. The file is updated so that Docker can use the NVIDIA Container Runtime.
- Restart the Docker daemon:
sudo systemctl restart docker
- If you have an NVIDIA card in your system and it is configured with the proper drivers, you can execute the following command to switch between the integrated graphics card and the NVIDIA GPU:
sudo prime-select nvidia
- After running prime-select, you will need to restart your system for the changes to take effect:
sudo reboot
Create a directory for the SIGSOFT environment and clone the repository:
mkdir ~/sigsoft && cd ~/sigsoft
git clone https://github.com/IntelligentRoboticsLabs/SSSER_Infraestructure.git
Navigate to the Docker directory and build the Docker image:
cd ~/sigsoft/SSSER_Infraestructure/docker/
docker buildx build --platform=linux/amd64 -t sigsoft:v1.0 .
Run the Docker image using the provided script:
./run_docker.sh
Open your browser and go to: http://localhost:6080/
You should see the environment running:
Create a custom installation script with the necessary setup for your courses and place it inside the installation_scripts
folder.
Build the Docker image and run it as described in steps 4 to 7.
Once the Docker container is running, open a terminal inside the container and execute your script:
source /installation_scripts/your_script.sh