Docker Compose setup for LEIP Design and LEIP Optimize with GPU support.
- Docker and Docker Compose
- NVIDIA GPU with drivers
- NVIDIA Container Toolkit
- LatentAI credentials (Repository Token & License Key)
- g4dn.xlarge EC2 instance
- Deep Learning OSS Nvidia Driver AMI GPU TensorFlow 2.18 (Ubuntu 22.04)
- 150GB of storage
Configure credentials and generate .env file:
source setup.shYou'll be prompted for:
- Repository Token Name
- Repository Token Passcode
- LEIP License Key
Choose one of the following:
# LEIP Design with Jupyter (includes optimize functionality)
# Includes tutorial notebooks for both Design and Optimize
docker compose --profile leip-design up
# LEIP Optimize standalone with Jupyter
# Includes tutorial notebooks for Optimize only
docker compose --profile leip-optimize-jupyter up
# LEIP Optimize bash shell (detached, for CLI workflows)
# Does not include tutorial notebooks
docker compose --profile leip-optimize-bash up -d
docker compose exec leip-optimize-bash bashNote: Notebook availability can be adjusted in docker-compose.yml volume mounts.
# Build offline image (first time only)
./leip-design/build-offline.sh
# Run offline mode
docker compose --profile leip-design-offline up# Save the image as a compressed tarball
docker save leip-design-offline:${LEIP_DESIGN_VERSION} | gzip > leip-design-offline-${LEIP_DESIGN_VERSION}.tar.gz
# Transfer to target machine, then load:
docker load -i leip-design-offline-${LEIP_DESIGN_VERSION}.tar.gz
# Run the loaded image
docker compose --profile leip-design-offline up# Stop containers (preserves container state)
docker compose stop
# Stop and remove containers (clean shutdown)
docker compose downNote: stop pauses containers for quick restart. down removes containers but preserves volumes.
Default ports:
- LEIP Design: 8888
- LEIP Optimize: 8889
- TensorBoard: 6006
To change versions or ports, edit .env or re-run source setup.sh.
.
├── setup.sh # Interactive setup script
├── docker-compose.yml # Service definitions
├── .env # Generated configuration (do not commit)
├── workspace/ # LEIP Design workspace
├── latentai/ # LEIP Optimize workspace
└── leip-design/
└── build-offline.sh # Offline image builder