Using Docker & Kubernetes
Stay organized with collections
Save and categorize content based on your preferences.
A Docker image is provided for you to evaluate these features. You can download this image as part of the AIStreamer.
Please note that use of third-party software is solely at your discretion. Google does not own the copyright of third-party software.
Prerequistes
Install Docker.
Install Google Cloud CLI.
Install Kubernetes.
Build Docker image
Go into the ingestion directory and run the following command line on your host machine:
$exportDOCKER_IMAGE=gcr.io/gcp-project-name/docker-image-name:version $dockerbuild-t$DOCKER_IMAGE-fenv/Dockerfile.
Try Docker image on your local host
Run following command in the terminal for your host machine:
$dockerrun-it$DOCKER_IMAGE/bin/bashThe command returns a response similar to the following example.
root@e504724e76fc:/#
To open another terminal connecting to Docker, run the following command on the host machine:
$dockerexec-ite504724e76fc/bin/bashNow, you have both host terminals that are in the same Docker container.
Docker image environment setting
Some environment settings can be customized in the Docker image.
#set up environment for Google Video Intelligence Streaming API
ENV SRC_DIR /googlesrc #Source code directory
ENV BIN_DIR /google #Binary directoryPush Docker image to Google Cloud container registry
Run the following command in the terminal for your host machine:
$gclouddocker--verbositydebug--push$DOCKER_IMAGEYou might need to set access control.
Deploy to Google Cloud
Run the following commands in the terminal for your host machine:
$exportKUBE_ID=any_string_you_like $kubectlrun-it$KUBE_ID--image=$DOCKER_IMAGE--/bin/bash
This returns a response similar to the following:
root@$KUBE_ID-215855480-c4sqp:/#
To open another terminal connecting to the same Kubernetes container on Google Cloud, run the following command line on host machine:
$kubectlexec-it$KUBE_ID-215855480-c4sqp--/bin/bash
Now, you have both host terminals that are in the same Kubernetes container on Google Cloud.