Skip to content
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
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ TYPOS_ARCH = $(TYPOS_TARGET_ARCH)-unknown-linux-musl
endif

CONTAINER_TOOL := $(shell { command -v docker >/dev/null 2>&1 && echo docker; } || { command -v podman >/dev/null 2>&1 && echo podman; } || echo "")
export CONTAINER_TOOL
BUILDER := $(shell command -v buildah >/dev/null 2>&1 && echo buildah || echo $(CONTAINER_TOOL))
PLATFORMS ?= linux/amd64 # linux/arm64 # linux/s390x,linux/ppc64le

Expand Down Expand Up @@ -293,9 +294,16 @@ check-envsubst:

.PHONY: check-container-tool
check-container-tool:
@command -v $(CONTAINER_TOOL) >/dev/null 2>&1 || { \
echo "❌ $(CONTAINER_TOOL) is not installed."; \
echo "🔧 Try: sudo apt install $(CONTAINER_TOOL) OR brew install $(CONTAINER_TOOL)"; exit 1; }
@if [ -z "$(CONTAINER_TOOL)" ]; then \
echo "❌ Error: No container tool detected. Please install docker or podman."; \
exit 1; \
elif ! command -v $(CONTAINER_TOOL) >/dev/null 2>&1; then \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Since L40 sets CONTAINER_TOOL using command -v ..., can the check in L300 ever fail?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that's fair - this was the original check for the make target so I didn't want to remove it. Without this, the check basically just becomes "Is CONTAINER_TOOL an empty string"?

echo "❌ Error: '$(CONTAINER_TOOL)' is not installed or not in your PATH."; \
echo "🔧 Try: sudo apt install $(CONTAINER_TOOL) OR brew install $(CONTAINER_TOOL)"; \
exit 1; \
else \
echo "✅ Container tool '$(CONTAINER_TOOL)' found."; \
fi

.PHONY: check-kubectl
check-kubectl:
Expand Down
16 changes: 10 additions & 6 deletions test/scripts/run_e2e.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Use the CONTAINER_TOOL from the environment, or default to docker if it's not set.
CONTAINER_TOOL="${CONTAINER_TOOL:-docker}"
echo "Using container tool: ${CONTAINER_TOOL}"

# Set a default EPP_TAG if not provided
export EPP_TAG="${EPP_TAG:-dev}"

Expand All @@ -9,27 +13,27 @@ export VLLM_SIMULATOR_TAG="${VLLM_SIMULATOR_TAG:-v0.4.0}"
# Set the default routing side car image tag
export ROUTING_SIDECAR_TAG="${ROUTING_SIDECAR_TAG:-v0.2.0}"

SIMTAG=$(docker images | grep ghcr.io/llm-d/llm-d-inference-sim | awk '{print $2}' | grep ${VLLM_SIMULATOR_TAG})
SIMTAG=$(${CONTAINER_TOOL} images | grep ghcr.io/llm-d/llm-d-inference-sim | awk '{print $2}' | grep ${VLLM_SIMULATOR_TAG})
if [[ "${SIMTAG}" != "${VLLM_SIMULATOR_TAG}" ]]; then
docker pull ghcr.io/llm-d/llm-d-inference-sim:${VLLM_SIMULATOR_TAG}
${CONTAINER_TOOL} pull ghcr.io/llm-d/llm-d-inference-sim:${VLLM_SIMULATOR_TAG}
if [[ $? != 0 ]]; then
echo "Failed to pull ghcr.io/llm-d/llm-d-inference-sim:${VLLM_SIMULATOR_TAG}"
exit 1
fi
fi

EPPTAG=$(docker images | grep ghcr.io/llm-d/llm-d-inference-scheduler | awk '{print $2}' | grep ${EPP_TAG})
EPPTAG=$(${CONTAINER_TOOL} images | grep ghcr.io/llm-d/llm-d-inference-scheduler | awk '{print $2}' | grep ${EPP_TAG})
if [[ "${EPPTAG}" != "${EPP_TAG}" ]]; then
docker pull ghcr.io/llm-d/llm-d-inference-scheduler:${EPP_TAG}
${CONTAINER_TOOL} pull ghcr.io/llm-d/llm-d-inference-scheduler:${EPP_TAG}
if [[ $? != 0 ]]; then
echo "Failed to pull ghcr.io/llm-d/llm-d-inference-scheduler:${EPP_TAG}"
exit 1
fi
fi

SIDECARTAG=$(docker images | grep ghcr.io/llm-d/llm-d-routing-sidecar | awk '{print $2}' | grep ${ROUTING_SIDECAR_TAG})
SIDECARTAG=$(${CONTAINER_TOOL} images | grep ghcr.io/llm-d/llm-d-routing-sidecar | awk '{print $2}' | grep ${ROUTING_SIDECAR_TAG})
if [[ "${SIDECARTAG}" != "${ROUTING_SIDECAR_TAG}" ]]; then
docker pull ghcr.io/llm-d/llm-d-routing-sidecar:${ROUTING_SIDECAR_TAG}
${CONTAINER_TOOL} pull ghcr.io/llm-d/llm-d-routing-sidecar:${ROUTING_SIDECAR_TAG}
if [[ $? != 0 ]]; then
echo "Failed to pull ghcr.io/llm-d/llm-d-routing-sidecar:${ROUTING_SIDECAR_TAG}"
exit 1
Expand Down