diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 00000000..16c84476 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,14 @@ +ARG GO_VERSION=1.20 +ARG DEBIAN_VERSION=11 +ARG BUILD_TYPE= + +FROM golang:$GO_VERSION as builder +WORKDIR /build +RUN apt-get update && apt-get install -y cmake +COPY . . +RUN make build + +FROM debian:$DEBIAN_VERSION +COPY --from=builder /build/local-ai /usr/bin/local-ai +EXPOSE 8080 +ENTRYPOINT [ "/usr/bin/local-ai" ] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 8058e467..f7d76538 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,11 +5,11 @@ services: image: quay.io/go-skynet/local-ai:latest build: context: . - dockerfile: Dockerfile + dockerfile: Dockerfile.dev ports: - 8080:8080 env_file: - .env volumes: - ./models:/models:cached - command: ["/usr/bin/local-ai" ] \ No newline at end of file + command: ["/usr/bin/local-ai" ] diff --git a/examples/chatbot-ui/docker-compose.yaml b/examples/chatbot-ui/docker-compose.yaml index c7782c34..a5f94aca 100644 --- a/examples/chatbot-ui/docker-compose.yaml +++ b/examples/chatbot-ui/docker-compose.yaml @@ -5,7 +5,7 @@ services: image: quay.io/go-skynet/local-ai:latest build: context: ../../ - dockerfile: Dockerfile + dockerfile: Dockerfile.dev ports: - 8080:8080 environment: