First, install Docker Enigne on your Ubuntu system. Follow the official Docker documentation for instructions: Docker Engine on Ubuntu.
Create a directory for the school environment and clone the repository:
mkdir ~/school && cd ~/school
git clone https://github.com/IntelligentRoboticsLabs/docker_infrastructure.git
To use GPU resources within your Docker containers:
- Install the NVIDIA drivers.
- Install the NVIDIA Container Toolkit. Execute the script:
cd ~/school/docker_infrastructure/docker/
./nvidia_install.sh
- 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
There are two ways to get the Docker image:
- 4.1. Downloading it from Docker Hub (RECOMMENDED):
docker pull jmguerreroh/school:ubuntu22
- 4.2. Building the image Navigate to the Docker directory and build the Docker image:
cd ~/school/docker_infrastructure/docker/
docker buildx build -t jmguerreroh/school:ubuntu22 -f Dockerfile .
Run the Docker image using the provided script:
./run_docker.sh
If you have any issues with the NVIDIA driver installation, or if the driver execution still does not work, you can run the script using the no-gpu option:
./run_docker.sh no-gpu
**Note: If you run this command without having the image, it will attempt to download it from Docker Hub as in step 4.1.
Open your browser and go to: http://localhost:6080/
You should see the environment running:
-
7.1. If the container is currently running and you need to stop it, follow these steps:
docker stop school
This won't delete anything done inside the container unless explicitly removed.
- 7.2. If it's stopped and you want to start it again:
docker start school
Create an installation script with the necessary setup for your courses and place it inside the installation_scripts
folder.
- Follow steps 4.2 and 5 again to build the Docker image.
- Execute your script inside the Docker container. Once the Docker container is running, open a terminal inside the container and execute your script:
source /installation_scripts/your_script.sh
If the students have a Docker image running, consider providing the script via a URL. The students can then download it using the Firefox browser within the Docker environment.