images: cleanup, drop .dev Dockerfile (#437)

Signed-off-by: mudler <mudler@mocaccino.org>
examples_update v1.17.1
Ettore Di Giacinto 2 years ago committed by GitHub
parent 6d71dd7d98
commit 577d36b596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      Dockerfile
  2. 79
      Dockerfile.dev
  3. 2
      docker-compose.yaml
  4. 2
      examples/chatbot-ui/docker-compose.yaml
  5. 2
      examples/discord-bot/docker-compose.yaml
  6. 2
      examples/langchain-python/docker-compose.yaml
  7. 2
      examples/langchain/docker-compose.yaml
  8. 2
      examples/rwkv/docker-compose.yaml
  9. 2
      examples/slack-bot/docker-compose.yaml

@ -55,9 +55,6 @@ ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
ENV NVIDIA_REQUIRE_CUDA="cuda>=${CUDA_MAJOR_VERSION}.0" ENV NVIDIA_REQUIRE_CUDA="cuda>=${CUDA_MAJOR_VERSION}.0"
ENV NVIDIA_VISIBLE_DEVICES=all ENV NVIDIA_VISIBLE_DEVICES=all
ENV HEALTHCHECK_ENDPOINT=http://localhost:8080/readyz ENV HEALTHCHECK_ENDPOINT=http://localhost:8080/readyz
ENV HEALTHCHECK_TIMEOUT=10m
ENV HEALTHCHECK_INTERVAL=10m
ENV HEALTHCHECK_RETRIES=10m
ENV REBUILD=true ENV REBUILD=true

@ -1,79 +0,0 @@
ARG GO_VERSION=1.20
ARG DEBIAN_VERSION=11
FROM golang:$GO_VERSION as builder
ARG BUILD_TYPE=
ARG GO_TAGS=
ARG CUDA_MAJOR_VERSION=11
ARG CUDA_MINOR_VERSION=7
ENV BUILD_TYPE=${BUILD_TYPE}
ENV GO_TAGS=${GO_TAGS}
WORKDIR /build
RUN apt-get update && \
apt-get install -y cmake
# CuBLAS requirements
RUN if [ "${BUILD_TYPE}" = "cublas" ]; then \
apt-get install -y software-properties-common && \
apt-add-repository contrib && \
curl -O https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.0-1_all.deb && \
dpkg -i cuda-keyring_1.0-1_all.deb && \
rm -f cuda-keyring_1.0-1_all.deb && \
apt-get update && \
apt-get install -y cuda-nvcc-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcublas-dev-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} \
; fi
ENV PATH /usr/local/cuda/bin:${PATH}
# OpenBLAS requirements
RUN apt-get install -y libopenblas-dev
# Stable Diffusion requirements
RUN apt-get install -y libopencv-dev && \
ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2
COPY . .
RUN make build
FROM debian:$DEBIAN_VERSION
ARG BUILD_TYPE=
ARG GO_TAGS=
ARG CUDA_MAJOR_VERSION=11
ARG CUDA_MINOR_VERSION=7
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
ENV NVIDIA_REQUIRE_CUDA="cuda>=${CUDA_MAJOR_VERSION}.0"
ENV NVIDIA_VISIBLE_DEVICES=all
ENV HEALTHCHECK_ENDPOINT=http://localhost:8080/readyz
RUN apt-get update && \
apt-get install -y ca-certificates curl
# CuBLAS requirements
RUN if [ "${BUILD_TYPE}" = "cublas" ]; then \
apt-get install -y curl software-properties-common && \
apt-add-repository contrib && \
curl -O https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.0-1_all.deb && \
dpkg -i cuda-keyring_1.0-1_all.deb && \
rm -f cuda-keyring_1.0-1_all.deb && \
apt-get update && \
apt-get install -y cuda-cudart-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcublas-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} \
; fi
# OpenBLAS requirements
RUN apt-get install -y libopenblas0
# Stable Diffusion requirements
RUN apt-get install -y libgomp1 libopencv-core4.5 libopencv-imgcodecs4.5
COPY --from=builder /build/local-ai /usr/bin/local-ai
# Define the health check command
HEALTHCHECK --interval=1m --timeout=10m --retries=10 \
CMD curl -f $HEALTHCHECK_ENDPOINT || exit 1
EXPOSE 8080
ENTRYPOINT [ "/usr/bin/local-ai" ]

@ -5,7 +5,7 @@ services:
image: quay.io/go-skynet/local-ai:latest image: quay.io/go-skynet/local-ai:latest
build: build:
context: . context: .
dockerfile: Dockerfile.dev dockerfile: Dockerfile
ports: ports:
- 8080:8080 - 8080:8080
env_file: env_file:

@ -5,7 +5,7 @@ services:
image: quay.io/go-skynet/local-ai:latest image: quay.io/go-skynet/local-ai:latest
build: build:
context: ../../ context: ../../
dockerfile: Dockerfile.dev dockerfile: Dockerfile
ports: ports:
- 8080:8080 - 8080:8080
environment: environment:

@ -5,7 +5,7 @@ services:
image: quay.io/go-skynet/local-ai:latest image: quay.io/go-skynet/local-ai:latest
build: build:
context: ../../ context: ../../
dockerfile: Dockerfile.dev dockerfile: Dockerfile
ports: ports:
- 8080:8080 - 8080:8080
environment: environment:

@ -5,7 +5,7 @@ services:
image: quay.io/go-skynet/local-ai:latest image: quay.io/go-skynet/local-ai:latest
build: build:
context: ../../ context: ../../
dockerfile: Dockerfile.dev dockerfile: Dockerfile
ports: ports:
- 8080:8080 - 8080:8080
environment: environment:

@ -5,7 +5,7 @@ services:
image: quay.io/go-skynet/local-ai:latest image: quay.io/go-skynet/local-ai:latest
build: build:
context: ../../ context: ../../
dockerfile: Dockerfile.dev dockerfile: Dockerfile
ports: ports:
- 8080:8080 - 8080:8080
environment: environment:

@ -5,7 +5,7 @@ services:
image: quay.io/go-skynet/local-ai:latest image: quay.io/go-skynet/local-ai:latest
build: build:
context: ../../ context: ../../
dockerfile: Dockerfile.dev dockerfile: Dockerfile
ports: ports:
- 8080:8080 - 8080:8080
environment: environment:

@ -5,7 +5,7 @@ services:
image: quay.io/go-skynet/local-ai:latest image: quay.io/go-skynet/local-ai:latest
build: build:
context: ../../ context: ../../
dockerfile: Dockerfile.dev dockerfile: Dockerfile
ports: ports:
- 8080:8080 - 8080:8080
environment: environment:

Loading…
Cancel
Save