Skip to content

Commit fbbd2f6

Browse files
committed
feat(conda): add make target and entrypoints for the dockerfile
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent f40962e commit fbbd2f6

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

Diff for: Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARG TARGETARCH
1111
ARG TARGETVARIANT
1212

1313
ENV BUILD_TYPE=${BUILD_TYPE}
14-
ENV EXTERNAL_GRPC_BACKENDS="huggingface-embeddings:/build/extra/grpc/huggingface/huggingface.py,autogptq:/build/extra/grpc/autogptq/autogptq.py,bark:/build/extra/grpc/bark/ttsbark.py,diffusers:/build/extra/grpc/diffusers/backend_diffusers.py,exllama:/build/extra/grpc/exllama/exllama.py,vall-e-x:/build/extra/grpc/vall-e-x/ttsvalle.py,vllm:/build/extra/grpc/vllm/backend_vllm.py"
14+
ENV EXTERNAL_GRPC_BACKENDS="huggingface-embeddings:/build/extra/grpc/huggingface/huggingface.py,autogptq:/build/extra/grpc/autogptq/run.sh,bark:/build/extra/grpc/bark/run.sh,diffusers:/build/extra/grpc/diffusers/backend_diffusers.py,exllama:/build/extra/grpc/exllama/exllama.py,vall-e-x:/build/extra/grpc/vall-e-x/ttsvalle.py,vllm:/build/extra/grpc/vllm/backend_vllm.py"
1515
ENV GALLERIES='[{"name":"model-gallery", "url":"github:go-skynet/model-gallery/index.yaml"}, {"url": "github:go-skynet/model-gallery/huggingface.yaml","name":"huggingface"}]'
1616
ARG GO_TAGS="stablediffusion tts"
1717

@@ -39,6 +39,7 @@ COPY extra/requirements.txt /build/extra/requirements.txt
3939
ENV PATH="/root/.cargo/bin:${PATH}"
4040
RUN pip install --upgrade pip
4141
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
42+
RUN make prepare-extra-conda-environments
4243
RUN if [ "${TARGETARCH}" = "amd64" ]; then \
4344
pip install git+https://github.com/suno-ai/bark.git diffusers invisible_watermark transformers accelerate safetensors;\
4445
fi

Diff for: Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,10 @@ protogen-python:
379379

380380
## GRPC
381381

382+
prepare-extra-conda-environments:
383+
$(MAKE) -C extra/grpc/autogptq
384+
$(MAKE) -C extra/grpc/bark
385+
382386
backend-assets/grpc:
383387
mkdir -p backend-assets/grpc
384388

Diff for: extra/grpc/autogptq/run.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
##
2+
## A bash script wrapper that runs the autogptq server with conda
3+
4+
# Activate conda environment
5+
source activate autogptq
6+
7+
# get the directory where the bash script is located
8+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
9+
10+
python $DIR/autogptq.py

Diff for: extra/grpc/bark/run.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
##
2+
## A bash script wrapper that runs the ttsbark server with conda
3+
4+
# Activate conda environment
5+
source activate ttsbark
6+
7+
# get the directory where the bash script is located
8+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
9+
10+
python $DIR/ttsbark.py

0 commit comments

Comments
 (0)