Examples
Example scripts
The container starts in the /examples directory.
The bash history is pre-populated with common commands.
Use the Up Arrow on your keyboard to cycle through these shortcuts.
The examples included in the Docker image are:
adult.py: UCI Adult dataset, the simplest scenario, a single table dataset.basket.py: BasketballMen dataset, a multi-table relational dataset with three tables.
Training a Model
To run the "Adult" dataset example on a specific GPU:
DEVICE=cuda:0 python adult.py
Monitoring with TensorBoard
The toolkit supports real-time training visualization. You can start the TensorBoard server inside the container:
# Assuming the output directory is set to /example/output/, the library
# automatically populates the tb sub-directory with TensorBoard data
# Open another shell and run
docker exec -it <aindo-toolkit-container-name> tensorboard --bind_all --logdir /example/output/tb
Tip
To access the UI from your browser, remember to map the port when starting the container (e.g., -p 6006:6006).
Running SSHD as the Primary Process
To run the container as a dedicated SSH server, you can override the default entrypoint.
Since the container runs as the non-root aindo user, you must use a specific configuration that avoids restricted
system directories.
Example Command
docker run -d \
--name aindo-toolkit-server \
--gpus all \
-p 2222:2222 \
-e AINDO_LICENSE="your_license_key" \
-v /path/to/your/ssh_config:/home/aindo/.ssh:ro \
aindo/aindo-toolkit:latest \
/usr/sbin/sshd -D -e -p 2222 -o "PidFile=none" -h /home/aindo/.ssh/ssh_host_key
Understanding the SSH Flags
/usr/sbin/sshd: The full path is required as sshd generally does not rely on the user's $PATH for security reasons.-D: Prevents the daemon from detaching (daemonizing), keeping the container running in the foreground.-e: Redirects logs to stderr so you can view SSH connection attempts via docker logs.-p 2222: Uses a non-privileged port, as the aindo user cannot bind to the standard port 22.-o "PidFile=none": Disables the creation of a PID file, as the aindo user does not have write permissions for the default /run directory.-h /home/aindo/.ssh/hostkey: Directs the server to use a custom host key located in the user's home directory, avoiding the unreadable system keys in /etc/ssh/.
Key-Based Authentication
For this setup to work securely, you should use SSH key-based authentication. You have to mount a local directory to
/home/aindo/.ssh/ containing the following files:
authorized_keys: Contains the public keys of the users allowed to connect.ssh_host_key: The private host key for the server (provided by you).
Warning
Ensure your local directory has the correct permissions (typically 700 for the directory and 600 for the keys) before mounting, as SSH is strict about file ownership and permissions.