diff --git a/Dockerfile b/Dockerfile index 84d09b6..848d4cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,6 @@ RUN pip install /tmp/agent-machine/*.whl --no-cache --no-deps FROM agent-machine-base as agent-machine -# Finally copy resources over since they will mutate most frequently COPY metrics.json /app/metrics.json FROM agent-machine diff --git a/Makefile b/Makefile index 89c1f3f..8a2bea2 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,11 @@ ARGS ?= serve-dev: .make/poetry_install .env @echo "Starting Server..." - @poetry run eidolon-server -m local_dev resources --dotenv .env $(ARGS) + @poetry run eidolon-server -m local_dev eidolon_resources --dotenv .env $(ARGS) serve: .make/poetry_install .env @echo "Starting Server..." - @poetry run eidolon-server resources --dotenv .env $(ARGS) + @poetry run eidolon-server eidolon_resources --dotenv .env $(ARGS) test: .make/poetry_install .env @poetry run pytest tests $(ARGS) @@ -143,7 +143,7 @@ k8s-server: check-cluster-running docker-build docker-push k8s-env -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 --namespace=$(NAMESPACE) - -@kubectl apply -f resources/ --namespace=$(NAMESPACE) + -@kubectl apply -f eidolon_resources/ --namespace=$(NAMESPACE) @kubectl apply -f k8s/eidolon-ext-service.yaml --namespace=$(NAMESPACE) @echo "Waiting for eidolon-deployment to be ready..." @kubectl rollout status deployment/eidolon-deployment --timeout=60s --namespace=$(NAMESPACE) @@ -183,4 +183,4 @@ pull-webui: fi k8s-clean: - @kubectl delete -f k8s/ephemeral_machine.yaml -f resources/ -f k8s/eidolon-ext-service.yaml -f k8s/webui.yaml -n $(NAMESPACE) + @kubectl delete -f k8s/ephemeral_machine.yaml -f eidolon_resources/ -f k8s/eidolon-ext-service.yaml -f k8s/webui.yaml -n $(NAMESPACE) diff --git a/README.md b/README.md index f1777c5..3ed42e2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This project serves as a template for individuals interested in building agents ## Directory Structure -- `resources`: This directory contains additional resources for the project. An example agent is provided for reference. +- `eidolon_resources`: This directory contains additional resources for the project. An example agent is provided for reference. - `components`: This directory is where any custom code should be placed. ## Running the Server in Docker diff --git a/docker-compose.yml b/docker-compose.yml index e3031c4..9640714 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: env_file: - .env volumes: - - ./resources:/bound_resources + - ./eidolon_resources:/bound_resources command: /bound_resources/ -m local_dev --reload --fail-on-bad-agent true webui: diff --git a/resources/README.md b/eidolon_resources/README.md similarity index 85% rename from resources/README.md rename to eidolon_resources/README.md index c41188a..995ad0a 100644 --- a/resources/README.md +++ b/eidolon_resources/README.md @@ -15,6 +15,6 @@ spec: system_prompt: "You are a friendly greeter who greets people by name while using emojis" ``` -You can add this to your machine by creating a new file in the `resources` directory. The file can be named anything you like, but should have a `.yaml` extension. +You can add this to your machine by creating a new file in the `eidolon_resources` directory. The file can be named anything you like, but should have a `.yaml` extension. See the [Eidolon Documentation](https://www.eidolonai.com/) for more information on how to define agents and components. diff --git a/k8s/Readme.md b/k8s/Readme.md index 75467cb..50bf85f 100644 --- a/k8s/Readme.md +++ b/k8s/Readme.md @@ -19,10 +19,10 @@ The `k8s-operator` target installs the Eidolon operator in your k8s cluster. Thi These command should work for either a local k8s environment or a cloud based k8s environment. -The `k8s-serve` target builds the agent docker image and installs the Eidolon agent machine, and all other yaml files in the resources directory, in your k8s cluster. +The `k8s-serve` target builds the agent docker image and installs the Eidolon agent machine, and all other yaml files in the `eidolon_resources` directory, in your k8s cluster. There are builtin assumptions that make local development easier but prevents remote development. Particularly, the scripts rely on the local image names and the image is not pushed to a remote repository. This is because the image is built and pushed to the local docker daemon and the k8s cluster is configured to use the local docker daemon. -If you want to use a remote docker repository, you will need to modify the `resources/ephemeral_machine.yaml.yaml` file to use a remote image name, +If you want to use a remote docker repository, you will need to modify the `eidolon_resources/ephemeral_machine.yaml.yaml` file to use a remote image name, and you will need to push the image to the remote repository when building the docker image. You may also need to adjust the ImagePullPolicy from its default value of `IfNotPresent` to `Always`. diff --git a/tests/conftest.py b/tests/conftest.py index 4f0a8b6..c96b535 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,7 +22,7 @@ def machine(tmp_path_factory): @pytest.fixture(scope="session", autouse=True) def server(machine): - resources = load_resources([Path(__file__).parent.parent / "resources"]) + resources = load_resources([Path(__file__).parent.parent / "eidolon_resources"]) with serve_thread([machine, *resources]): yield