Skip to content

Commit

Permalink
Revert "Docker preserve sources (#590)"
Browse files Browse the repository at this point in the history
This reverts commit 7b9dcb0.
  • Loading branch information
mudler authored Jun 17, 2023
1 parent 295f303 commit 998dc09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ ENV NVIDIA_VISIBLE_DEVICES=all

WORKDIR /build

COPY Makefile .
RUN make get-sources
COPY go.mod .
RUN make prepare
COPY . .
RUN make build

Expand All @@ -62,8 +58,9 @@ RUN if [ "${FFMPEG}" = "true" ]; then \

WORKDIR /build

COPY . .
RUN make prepare-sources
COPY --from=builder /build/local-ai ./
COPY entrypoint.sh .

# Define the health check command
HEALTHCHECK --interval=1m --timeout=10m --retries=10 \
Expand Down
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ gpt4all/gpt4all-bindings/golang/libgpt4all.a: gpt4all
$(MAKE) -C gpt4all/gpt4all-bindings/golang/ libgpt4all.a

## CEREBRAS GPT
go-ggml-transformers:
go-ggml-transformers:
git clone --recurse-submodules https://github.com/go-skynet/go-ggml-transformers.cpp go-ggml-transformers
cd go-ggml-transformers && git checkout -b build $(GOGPT2_VERSION) && git submodule update --init --recursive --depth 1
# This is hackish, but needed as both go-llama and go-gpt4allj have their own version of ggml..
Expand Down Expand Up @@ -169,12 +169,9 @@ go-llama:
git clone --recurse-submodules https://github.com/go-skynet/go-llama.cpp go-llama
cd go-llama && git checkout -b build $(GOLLAMA_VERSION) && git submodule update --init --recursive --depth 1

go-llama/libbinding.a: go-llama
go-llama/libbinding.a: go-llama
$(MAKE) -C go-llama BUILD_TYPE=$(BUILD_TYPE) libbinding.a

get-sources: go-llama go-ggml-transformers gpt4all go-rwkv whisper.cpp go-bert bloomz go-stable-diffusion
touch $@

replace:
$(GOCMD) mod edit -replace github.com/go-skynet/go-llama.cpp=$(shell pwd)/go-llama
$(GOCMD) mod edit -replace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang=$(shell pwd)/gpt4all/gpt4all-bindings/golang
Expand All @@ -185,7 +182,7 @@ replace:
$(GOCMD) mod edit -replace github.com/go-skynet/bloomz.cpp=$(shell pwd)/bloomz
$(GOCMD) mod edit -replace github.com/mudler/go-stable-diffusion=$(shell pwd)/go-stable-diffusion

prepare-sources: get-sources replace
prepare-sources: go-llama go-ggml-transformers gpt4all go-rwkv whisper.cpp go-bert bloomz go-stable-diffusion replace
$(GOCMD) mod download

## GENERIC
Expand All @@ -201,7 +198,6 @@ rebuild: ## Rebuilds the project
$(MAKE) build

prepare: prepare-sources backend-assets/gpt4all $(OPTIONAL_TARGETS) go-llama/libbinding.a go-bert/libgobert.a go-ggml-transformers/libtransformers.a go-rwkv/librwkv.a whisper.cpp/libwhisper.a bloomz/libbloomz.a ## Prepares for building
touch $@

clean: ## Remove build related file
rm -fr ./go-llama
Expand Down

0 comments on commit 998dc09

Please sign in to comment.