Skip to content

Latest commit

 

History

History
 
 

develop-image

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Docker Development image

All the commands must be executed from the parent directory, if not stated otherwise.

Build

docker build . \
-t valory/open-aea-develop:latest \
--file develop-image/Dockerfile 

To pass immediate parameters to the docker build command:

docker build . \
    -t valory/open-aea-develop:latest \
    --file develop-image/Dockerfile \
    arg1 arg2

E.g.:

docker build . \
    -t valory/open-aea-develop:latest \
    --file develop-image/Dockerfile  \
    --cpu-quota 4 --compress

Run

docker run -it valory/open-aea-develop:latest /bin/bash

Pass parameters to the docker run command:

docker run -it -p 8080:8080 valory/open-aea-develop:latest /bin/bash

Publish

First, be sure you tagged the image with the latest tag:

docker tag valory/open-aea-develop:<latest-version-number> valory/open-aea-develop:latest

Then, publish the images. First, the valory/open-aea-develop:<latest-version-number>

docker push valory/open-aea-develop:<latest-version-number>

And then, the valory/open-aea-develop:latest image:

docker push valory/open-aea-develop:latest

Publish to k8s

Switch the context:

kubectx sandbox

List pods in cluster:

kubectl get pods

Optionally, create new namespace:

kubectl create namespace aea-research

Ensure right namespace is used:

kubens aea-research

Choose namespace in cluster:

kubens aea-research

To enter selected namespace:

kubens

From the develop-image folder run:

skaffold run -p sandbox

SSH into a new image:

kubectl run --generator=run-pod/v1 -it debian --image=debian -- bash

Dedicated node pool for benchmarking agents

Setup and tear down

To create the node pool

gcloud container node-pools create agent-test-pool --cluster sandbox --project fetch-ai-sandbox --node-taints dedicated=agent:NoSchedule --machine-type=n1-standard-4 --num-nodes=1 --enable-autoscaling --node-labels=type=agent-test --max-nodes=1  --min-nodes=0

To remove the node pool

gcloud container node-pools delete agent-test-pool --cluster sandbox --project fetch-ai-sandbox

Usage

List pods

kubectl get pod -o wide
kubectl exec -it NAME -- bash