Skip to content

Fix build issues #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
DOCKER_REPO_NAME := my-eidolon-project
DOCKER_REPO_URL ?=
DOCKER_REPO_NAME := $(if $(DOCKER_REPO_URL),$(DOCKER_REPO_URL),my-eidolon-project)
VERSION := $(shell grep -m 1 '^version = ' pyproject.toml | awk -F '"' '{print $$2}')
REQUIRED_ENVS := OPENAI_API_KEY

.PHONY: serve serve-dev check docker-serve _docker-serve .env sync update docker-build pull-webui k8s-operator check-kubectl check-helm check-cluster-running verify-k8s-permissions check-install-operator k8s-serve k8s-env test
.PHONY: serve serve-dev check docker-serve _docker-serve .env sync update docker-build docker-push pull-webui k8s-operator check-kubectl check-helm check-cluster-running verify-k8s-permissions check-install-operator k8s-serve k8s-env test

ARGS ?=

Expand Down Expand Up @@ -125,7 +126,10 @@ k8s-serve: k8s-server k8s-webui
--all-containers=true \
--prefix=true

k8s-server: check-cluster-running docker-build k8s-env
k8s-server: check-cluster-running docker-build docker-push k8s-env
@sed -e 's|image: .*|image: ${DOCKER_REPO_NAME}:latest|' \
-e 's|imagePullPolicy: .*|imagePullPolicy: $(if $(DOCKER_REPO_URL),Always,Never)|' \
k8s/ephemeral_machine.yaml > k8s/ephemeral_machine.yaml.tmp && mv k8s/ephemeral_machine.yaml.tmp k8s/ephemeral_machine.yaml
@kubectl apply -f k8s/ephemeral_machine.yaml
- @kubectl apply -f resources/
@kubectl apply -f k8s/eidolon-ext-service.yaml
Expand All @@ -147,7 +151,15 @@ k8s-env: .env
docker-build: poetry.lock Dockerfile
@docker build -t $(DOCKER_REPO_NAME):latest .

docker-push:
@if [ -n "$(DOCKER_REPO_URL)" ]; then \
docker push $(DOCKER_REPO_NAME):latest; \
fi

pull-webui:
@if ! docker image inspect eidolonai/webui:latest > /dev/null 2>&1; then \
docker pull eidolonai/webui:latest; \
fi

k8s-clean:
@kubectl delete -f k8s/ephemeral_machine.yaml -f resources/ -f k8s/eidolon-ext-service.yaml -f k8s/webui.yaml
7 changes: 5 additions & 2 deletions k8s/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ The `k8s-operator` target installs the Eidolon operator in your k8s cluster. Thi

* It first checks if helm and kubectl are installed
* It then checks the permissions of the current user to see if they can install the operator by running `./verify_k8s`
* If you are NOT using minikube locally set the environment variable `DOCKER_REPO_URL` to the proper location.
* Linux/OSX: `export DOCKER_REPO_URL=<ip>:5000/my-eidolon-project`
* Windows (Powershell): `$env:DOCKER_REPO_URL="<ip>:5000/my-eidolon-project"`
* It then checks if the operator is already installed, if not, it installs the operator by running
* `helm repo add eidolon https://eidolonai.com/charts`
* `helm install eidolon eidolon-operator/eidolon-operator-chart`
* It does not try to update the operator. If you want to update the operator, you will need to run `helm upgrade eidolon eidolon-operator/eidolon-operator-chart`
* `helm install eidolon eidolon/eidolon-operator-chart`
* It does not try to update the operator. If you want to update the operator, you will need to run `helm upgrade eidolon eidolon/eidolon-operator-chart`

These command should work for either a local k8s environment or a cloud based k8s environment.

Expand Down
2 changes: 1 addition & 1 deletion resources/conversational_agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: server.eidolon.com/v1alpha1
apiVersion: server.eidolonai.com/v1alpha1
kind: Agent
metadata:
name: conversational-agent
Expand Down
2 changes: 1 addition & 1 deletion resources/speech_agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: server.eidolon.com/v1alpha1
apiVersion: server.eidolonai.com/v1alpha1
kind: Agent
metadata:
name: speech-agent
Expand Down