Docker Installation¶
Cross Compilation Support
Cross compilation allows users to compile for a aarch64 device (for example, a Jetson or Raspberry Pi) on an x86_64 host device (an Intel or AMD CPU, for example). If you wish to compile for aarch64 you will need to install g++-aarch64-linux-gnu. You can use APT to install this on Ubuntu systems:
sudo apt-get install -y g++-aarch64-linux-gnu
1. Set license key¶
After you receive your license key via email, place it in the following location: ~/.leip/license.key.
If you'd like, export your license key as an environment variable:
export LEIP_LICENSE_KEY=<your-license-key>
mkdir -p ~/.leip && echo "$LEIP_LICENSE_KEY" > ~/.leip/license.key
Alternative license key configurations
If you prefer, you can simply set LEIP_LICENSE_KEY as an environment variable. You can also place the key in a .leip/license.key file in your project directory: "$PWD"/.leip/license.key.
2. Log in to container repository¶
Log in to Latent AI's container repository with the following command:
cat ~/.leip/license.key | docker login containers.latentai.io -u latentai --password-stdin
3. Start the Docker Container¶
The following command will pull the most recent leip-design image and start a Docker container with GPU support, shared file access, and a Jupyter Notebook interface accessible from your web browser at http://localhost:8888.
docker run \
-p 8888:8888 \
-p 6006:6006 \
--gpus all \
--shm-size=12g \
--pull=always \
-e TZ=America/New_York \
-e LEIP_LICENSE_KEY=$LEIP_LICENSE_KEY \
-e LEIP_LICENSE_FILE=/tmp/license.key \
-v ~/.leip/license.key:/tmp/license.key:ro \
-v "$PWD":/latentai \
containers.latentai.io/leip-design:latest
docker run Flag Explanations
-p 8888:8888: Maps port 8888 on the host to port 8888 inside the container. Jupyter Notebook listens on port 8888 by default, allowing you to access it at http://localhost:8888.-p 6006:6006: Maps port 6006 on the host to port 6006 in the container for TensorBoard.--gpus all: Makes all available GPUs on the host accessible inside the container. If your machine has no GPU support, you may omit this.--shm-size=12g: Sets the container’s shared memory size to 12 GB. This value cannot exceed your host machine's available memory; if necessary, reduce the value appropriately.--pull=always: Ensures Docker always pulls the latest version of the image before running the container.-e TZ=America/New_York: Sets the timezone inside the container.-e LEIP_LICENSE_KEY=$LEIP_LICENSE_KEY: Passes your license key environment variable into the container. You can override the LEIP license key file by setting this environment variable.-e LEIP_LICENSE_FILE=/tmp/license.key: Tells LEIP Design where the license file will be located inside the container.-v ~/.leip/license.key:/tmp/license.key:ro: Mounts your license key file into the container at/tmp/license.keyas read-only.-v "$PWD":/latentai: Mounts the current working directory on your host machine into/latentaiinside the container, allowing shared file access.containers.latentai.io/leip-design:latest: Specifies the Docker image to run. It pulls the latestleip-designimage from the Latent AI repository and runs it.