Docker installation¶
1. Access Latent AI's container repository¶
Retrieve access token¶
In order to pull containers or install packages from Latent AI, you'll need to create a personal access token. To do so, follow these steps:
-
Login to the Latent AI Repository
- Click the
Sign inlink in the upper right. - Select
Sign In with SSO. - Enter your access credentials.
- Click the
-
Create your Personal Access Token
- Click on your profile in the upper right.
- Select
User Tokenon the left navigation. - Select the
Access user tokenbutton. - View your user token name and user token pass code.
You can export the token name and token passcode as environment variables:
export REPOSITORY_TOKEN_NAME=<user_token_name>
export REPOSITORY_TOKEN_PASSCODE=<user_token_pass_code>
Log in to container repository¶
Log in to Latent AI's container repository with the following command:
docker login repository.latentai.io -u $REPOSITORY_TOKEN_NAME -p $REPOSITORY_TOKEN_PASSCODE
2. Set LEIP 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 environmental variable:
export LEIP_LICENSE_KEY=<your-license-key>
mkdir -p ~/.leip && echo "$LEIP_LICENSE_KEY" > ~/.leip/license.key
3. Start the Docker container¶
The following command pulls the most recent Latent Assisted Label image and start a Docker container in the background. It mounts your current working directory as the /data directory inside the container, provides full GPU access, sets the shared memory size to 4 GB, exposes port 80, and provides access to your LEIP License Key.
docker run -d \
--gpus all \
--shm-size 4g \
-p 80:80 \
-e LEIP_LICENSE_KEY=$LEIP_LICENSE_KEY \
-v ~/.leip:/root/.leip:ro -v $PWD:/data:rw \
repository.latentai.io/leip-label