Skip to content
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

change eidolon_resources to resources #26

Merged
merged 1 commit into from
Oct 16, 2024
Merged
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
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion resources/README.md → eidolon_resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions k8s/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down