This is a simple python program which tests the openai
API tools library recently published
- Make sure you have properly downloaded all the necessary packages you will be using. In this case, I downloaded docker and minikube.
- Create a directory containing your application (In this case I used a python application testing the cohere API).
- Create a Dockerfile within the current working directory with information specifying what dependencies should be downloaded upon the creation of your local image.
- Run the command
docker build -t [name for your image] .
in order to build your Docker image with a specified name. This image will be stored within the local machine's docker image repository. - Next, you can start the container using the image you just created in order to test that it runs properly with the command
docker run [image name]
. - Create a .yml file in your current working directory using the documentation on the kubernetes deployments web page. Make sure to add
imagePullPolicy: Never
undercontainers:
to avoid pulling the image you specify from the external docker hub. - Finally, you can deploy the container with the specifications within the .yml file onto the cluster with the command
kubectl apply -f [file name]