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

Autolaunch Cluster when starting Edge-Endpoint #69

Merged
merged 2 commits into from
Jun 27, 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
5 changes: 4 additions & 1 deletion deploy/balena-k3s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ AWS_ACCESS_KEY_ID - so we can pull the edge-endpoint and gl-tritonserver images
AWS_SECRET_ACCESS_KEY - needed along with AWS_ACCESS_KEY_ID
```

Now, ssh into `bastion` and run the following:
Optionally you can also configure `EDGE_INFERENCE_FLAVOR` to use GPU instead. It will default to CPU if not set.

Dockerfile will automatically run the following command as `bastion` launches so no need to run this anymore.

```bash
cd /app/edge-endpoint
INFERENCE_FLAVOR="CPU" DEPLOYMENT_NAMESPACE="default" ./deploy/bin/cluster_setup.sh
Expand Down
9 changes: 8 additions & 1 deletion deploy/balena-k3s/bastion/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,12 @@ RUN arkade version && \
RUN mkdir -p /app/edge-endpoint
COPY . /app/edge-endpoint

# Set environment variables for running cluster setup based on env var EDGE_INFERENCE_FLAVOR, defaults to CPU if not set
ARG INFERENCE_FLAVOR_ARG="CPU"
ENV INFERENCE_FLAVOR=${EDGE_INFERENCE_FLAVOR:-$INFERENCE_FLAVOR_ARG}
ENV DEPLOYMENT_NAMESPACE="default"

RUN chmod +x ./edge-endpoint/deploy/bin/cluster_setup.sh

ENTRYPOINT []
CMD [ "tail" , "-f", "/dev/null" ]
CMD ["/bin/sh", "-c", "./edge-endpoint/deploy/bin/cluster_setup.sh && tail -f /dev/null"]
Loading