Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Fix issue with README.md changes
  • Loading branch information
vanakema committed Jul 2, 2024
1 parent 0145033 commit c918d9f
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 15 deletions.
16 changes: 7 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
ARCH ?= amd64
export ZARF_ARCHITECTURE = $(ARCH)
KEY ?= ""
REG_PORT ?= 5000

VERSION ?= $(shell git describe --abbrev=0 --tags)
LOCAL_VERSION ?= $(shell git rev-parse --short HEAD)
SDK_DEST ?= src/leapfrogai_sdk/build
######################################################################################

.PHONY: help
Expand Down Expand Up @@ -36,7 +34,7 @@ local-registry: ## Start up a local container registry. Errors in this target ar
-docker run -d -p ${REG_PORT}:5000 --restart=always --name registry registry:2

sdk-wheel: ## build wheels for the leapfrogai_sdk package as a dependency for other lfai components
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} --build-arg SDK_DEST=${SDK_DEST} -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:latest -f src/leapfrogai_sdk/Dockerfile .
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:${LOCAL_VERSION} -f src/leapfrogai_sdk/Dockerfile .

docker-supabase: local-registry
## Build the migration container for this version of the supabase package
Expand All @@ -51,7 +49,7 @@ build-supabase: docker-supabase

docker-api: local-registry sdk-wheel
## Build the API image (and tag it for the local registry)
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} --build-arg SDK_DEST=${SDK_DEST} -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-api:${LOCAL_VERSION} -f packages/api/Dockerfile .
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} --build-arg LOCAL_VERSION=${LOCAL_VERSION} -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-api:${LOCAL_VERSION} -f packages/api/Dockerfile .
docker tag ghcr.io/defenseunicorns/leapfrogai/leapfrogai-api:${LOCAL_VERSION} localhost:${REG_PORT}/defenseunicorns/leapfrogai/leapfrogai-api:${LOCAL_VERSION}

## Build the migration container for this version of the API
Expand Down Expand Up @@ -85,7 +83,7 @@ build-ui: docker-ui ## Build the leapfrogai_ui container and Zarf package

docker-llama-cpp-python: local-registry sdk-wheel
## Build the image (and tag it for the local registry)
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} -t ghcr.io/defenseunicorns/leapfrogai/llama-cpp-python:${LOCAL_VERSION} -f packages/llama-cpp-python/Dockerfile .
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} --build-arg LOCAL_VERSION=${LOCAL_VERSION} -t ghcr.io/defenseunicorns/leapfrogai/llama-cpp-python:${LOCAL_VERSION} -f packages/llama-cpp-python/Dockerfile .
docker tag ghcr.io/defenseunicorns/leapfrogai/llama-cpp-python:${LOCAL_VERSION} localhost:${REG_PORT}/defenseunicorns/leapfrogai/llama-cpp-python:${LOCAL_VERSION}

build-llama-cpp-python: docker-llama-cpp-python ## Build the llama-cpp-python (cpu) container and Zarf package
Expand All @@ -97,7 +95,7 @@ build-llama-cpp-python: docker-llama-cpp-python ## Build the llama-cpp-python (c

docker-vllm: local-registry sdk-wheel
## Build the image (and tag it for the local registry)
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} -t ghcr.io/defenseunicorns/leapfrogai/vllm:${LOCAL_VERSION} -f packages/vllm/Dockerfile .
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} --build-arg LOCAL_VERSION=${LOCAL_VERSION} -t ghcr.io/defenseunicorns/leapfrogai/vllm:${LOCAL_VERSION} -f packages/vllm/Dockerfile .
docker tag ghcr.io/defenseunicorns/leapfrogai/vllm:${LOCAL_VERSION} localhost:${REG_PORT}/defenseunicorns/leapfrogai/vllm:${LOCAL_VERSION}

build-vllm: docker-vllm ## Build the vllm container and Zarf package
Expand All @@ -109,7 +107,7 @@ build-vllm: docker-vllm ## Build the vllm container and Zarf package

docker-text-embeddings: local-registry sdk-wheel
## Build the image (and tag it for the local registry)
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} -t ghcr.io/defenseunicorns/leapfrogai/text-embeddings:${LOCAL_VERSION} -f packages/text-embeddings/Dockerfile .
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} --build-arg LOCAL_VERSION=${LOCAL_VERSION} -t ghcr.io/defenseunicorns/leapfrogai/text-embeddings:${LOCAL_VERSION} -f packages/text-embeddings/Dockerfile .
docker tag ghcr.io/defenseunicorns/leapfrogai/text-embeddings:${LOCAL_VERSION} localhost:${REG_PORT}/defenseunicorns/leapfrogai/text-embeddings:${LOCAL_VERSION}

build-text-embeddings: docker-text-embeddings ## Build the text-embeddings container and Zarf package
Expand All @@ -122,7 +120,7 @@ build-text-embeddings: docker-text-embeddings ## Build the text-embeddings conta

docker-whisper: local-registry sdk-wheel
## Build the image (and tag it for the local registry)
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} -t ghcr.io/defenseunicorns/leapfrogai/whisper:${LOCAL_VERSION} -f packages/whisper/Dockerfile .
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} --build-arg LOCAL_VERSION=${LOCAL_VERSION} -t ghcr.io/defenseunicorns/leapfrogai/whisper:${LOCAL_VERSION} -f packages/whisper/Dockerfile .
docker tag ghcr.io/defenseunicorns/leapfrogai/whisper:${LOCAL_VERSION} localhost:${REG_PORT}/defenseunicorns/leapfrogai/whisper:${LOCAL_VERSION}

build-whisper: docker-whisper ## Build the whisper container and zarf package
Expand All @@ -134,7 +132,7 @@ build-whisper: docker-whisper ## Build the whisper container and zarf package

docker-repeater: local-registry sdk-wheel
## Build the image (and tag it for the local registry)
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} -t ghcr.io/defenseunicorns/leapfrogai/repeater:${LOCAL_VERSION} -f packages/repeater/Dockerfile .
docker build --platform=linux/${ARCH} --build-arg ARCH=${ARCH} --build-arg LOCAL_VERSION=${LOCAL_VERSION} -t ghcr.io/defenseunicorns/leapfrogai/repeater:${LOCAL_VERSION} -f packages/repeater/Dockerfile .
docker tag ghcr.io/defenseunicorns/leapfrogai/repeater:${LOCAL_VERSION} localhost:${REG_PORT}/defenseunicorns/leapfrogai/repeater:${LOCAL_VERSION}

build-repeater: docker-repeater ## Build the repeater container and zarf package
Expand Down
3 changes: 2 additions & 1 deletion packages/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG ARCH
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:latest as sdk
ARG LOCAL_VERSION
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:${LOCAL_VERSION} as sdk

FROM ghcr.io/defenseunicorns/leapfrogai/python:3.11-dev-${ARCH} as builder
ARG SDK_DEST=src/leapfrogai_sdk/build
Expand Down
3 changes: 2 additions & 1 deletion packages/llama-cpp-python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG ARCH
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:latest as sdk
ARG LOCAL_VERSION
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:${LOCAL_VERSION} as sdk

# hardened and slim python w/ developer tools image
FROM --platform=$BUILDPLATFORM ghcr.io/defenseunicorns/leapfrogai/python:3.11-dev as builder
Expand Down
3 changes: 2 additions & 1 deletion packages/repeater/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG ARCH
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:latest as sdk
ARG LOCAL_VERSION
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:${LOCAL_VERSION} as sdk

# hardened and slim python w/ developer tools image
FROM ghcr.io/defenseunicorns/leapfrogai/python:3.11-dev-${ARCH} as builder
Expand Down
3 changes: 2 additions & 1 deletion packages/text-embeddings/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG ARCH
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:latest as sdk
ARG LOCAL_VERSION
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:${LOCAL_VERSION} as sdk

# hardened and slim python w/ developer tools image
FROM ghcr.io/defenseunicorns/leapfrogai/python:3.11-dev-${ARCH} as builder
Expand Down
3 changes: 2 additions & 1 deletion packages/vllm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:latest as sdk
ARG LOCAL_VERSION
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:${LOCAL_VERSION} as sdk

FROM nvidia/cuda:12.2.2-devel-ubuntu22.04 as builder
ARG SDK_DEST=src/leapfrogai_sdk/build
Expand Down
3 changes: 2 additions & 1 deletion packages/whisper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG ARCH
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:latest as sdk
ARG LOCAL_VERSION
FROM ghcr.io/defenseunicorns/leapfrogai/leapfrogai-sdk:${LOCAL_VERSION} as sdk

FROM --platform=$BUILDPLATFORM ghcr.io/defenseunicorns/leapfrogai/python:3.11-dev as builder
USER root
Expand Down
5 changes: 5 additions & 0 deletions uds-bundles/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ cd uds-bundles/dev/cpu
uds create .
```

Deploy a [UDS cluster](/README.md#uds) if one isn't deployed already

Deploy the LeapfrogAI bundle:
```shell
uds deploy uds-bundle-leapfrogai*.tar.zst
Expand All @@ -85,10 +87,13 @@ cd uds-bundles/dev/gpu
uds create .
```

Deploy a [UDS cluster](/README.md#uds) with the following flags, as so:

```shell
uds deploy {k3d-cluster-name} --set K3D_EXTRA_ARGS="--gpus=all --image=ghcr.io/justinthelaw/k3d-gpu-support:v1.27.4-k3s1-cuda"
```


Deploy the LeapfrogAI bundle:
```shell
uds deploy uds-bundle-leapfrogai-*.tar.zst --confirm
Expand Down

0 comments on commit c918d9f

Please sign in to comment.