Each new image requires a base image that is compatible with the booked ExaMesh instance. We strongly recommend using the images provided by ExaMesh. Among other things, they meet the following prescribed criteria:
For Pi Instances
Pi instances require armv7l (not x86_64) images, but this is now mostly handled automatically by the Docker download and build processes. Since the Raspberry Pi cosmos with Rasberry Pi OS (formerly Raspbian) is traditionally based on the Debian distribution, it is also a good choice as a Docker base image, as with the ExaMesh Pi base images.
For AI Instances
In order to be able to use CUDA in the AI instances, it is mandatory that the image contains the CUDA toolkit. The version is also important in this case, because: The CUDA version within the image must be identical to the CUDA version of the main system. As an end user, you do not have any flexibility in this aspect, but have to follow this specification when designing the image.
The CUDA version supported by an instance is part of the ExaMesh image description (see images table: “Components” column).
Due to the complexity, the image provided by ExaMesh is again strongly recommended. Alternatively, an image provided by NVIDIA can serve as a basis, provided that the correct CUDA version is observed.
The easiest way to create a new image is to use a suitable ExaMesh image as a base, because it fulfills all basic criteria by default: All ExaMesh images include an SSH service as well as additional packages and services that can be taken from the image list of an instance.
Thanks to the ExaMesh images, even beginners can very quickly create an executable image with their own customizations.
And their use has another advantage: ExaMesh images are always available on all instances, time-consuming downloads are no longer necessary. Since CUDA and AI images in particular often comprise several gigabytes, this caching enables a large number of tests with base-same image variants in a short time.
Since not using an ExaMesh base image is only recommended for experienced users, this path is not described further in this documentation. If it is to be followed for good reason anyway, further requirements are added to the base image and endpoints already described:
If an SSH service is required, the appropriate packages must be installed and the configuration path of the host keys must be checked in addition to the requirements already described: The ExaMesh platform automatically copies keys required at runtime to the /etc/ssh/ directory of the container. The SSH process started by the container must support this path, e.g. read its RSA host key from the file /etc/ssh/ssh_host_rsa_key. For Debian/Ubuntu package installations it is the case by default.
ExaMesh instances are completely volatile, i.e. when an instance is restarted, the underlying container is always recreated. All important information such as user data but also configuration files that are not part of an image must therefore be stored in the persistent directory /data of a container and linked in the image if necessary.
AI Instances and CUDA
Especially the integration of the CUDA toolkit for AI images has proven to be very error-prone. In these cases, an original NVIDIA CUDA image should therefore form the basis of the own image and be extended by the required services. It is essential to ensure that the correct CUDA version is used.