Skip to content

Commit

Permalink
Introduce 'entrypoint.sh' for some Containers (#274)
Browse files Browse the repository at this point in the history
Signed-off-by: Abolfazl Shahbazi <[email protected]>
  • Loading branch information
ashahba authored Jul 5, 2024
1 parent 9670465 commit 9ecc5c3
Show file tree
Hide file tree
Showing 24 changed files with 82 additions and 34 deletions.
2 changes: 1 addition & 1 deletion comps/llms/summarization/tgi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ENV PYTHONPATH=$PYTHONPATH:/home/user

WORKDIR /home/user/comps/llms/summarization/tgi

ENTRYPOINT ["python", "llm.py"]
ENTRYPOINT ["bash", "entrypoint.sh"]
8 changes: 8 additions & 0 deletions comps/llms/summarization/tgi/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

pip --no-cache-dir install -r requirements-runtime.txt

python llm.py
1 change: 1 addition & 0 deletions comps/llms/summarization/tgi/requirements-runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
langserve
1 change: 0 additions & 1 deletion comps/llms/summarization/tgi/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ docarray[full]
fastapi
huggingface_hub
langchain==0.1.16
langserve
langsmith
opentelemetry-api
opentelemetry-exporter-otlp
Expand Down
2 changes: 1 addition & 1 deletion comps/llms/text-generation/ollama/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ ENV PYTHONPATH=$PYTHONPATH:/home/user

WORKDIR /home/user/comps/llms/text-generation/ollama

ENTRYPOINT ["python", "llm.py"]
ENTRYPOINT ["bash", "entrypoint.sh"]
8 changes: 8 additions & 0 deletions comps/llms/text-generation/ollama/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

pip --no-cache-dir install -r requirements-runtime.txt

python llm.py
1 change: 1 addition & 0 deletions comps/llms/text-generation/ollama/requirements-runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
langserve
1 change: 0 additions & 1 deletion comps/llms/text-generation/ollama/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ docarray[full]
fastapi
huggingface_hub
langchain==0.1.16
langserve
langsmith
opentelemetry-api
opentelemetry-exporter-otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ ENV PYTHONPATH=$PYTHONPATH:/home/user

WORKDIR /home/user/comps/llms/text-generation/ray_serve

ENTRYPOINT ["python", "llm.py"]
ENTRYPOINT ["bash", "entrypoint.sh"]
8 changes: 8 additions & 0 deletions comps/llms/text-generation/ray_serve/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

pip --no-cache-dir install -r requirements-runtime.txt

python llm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
langserve
1 change: 0 additions & 1 deletion comps/llms/text-generation/ray_serve/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ fastapi
huggingface_hub
langchain==0.1.16
langchain_openai
langserve
langsmith
openai
opentelemetry-api
Expand Down
2 changes: 1 addition & 1 deletion comps/llms/text-generation/tgi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ENV PYTHONPATH=$PYTHONPATH:/home/user

WORKDIR /home/user/comps/llms/text-generation/tgi

ENTRYPOINT ["python", "llm.py"]
ENTRYPOINT ["bash", "entrypoint.sh"]
8 changes: 8 additions & 0 deletions comps/llms/text-generation/tgi/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

pip --no-cache-dir install -r requirements-runtime.txt

python llm.py
1 change: 1 addition & 0 deletions comps/llms/text-generation/tgi/requirements-runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
langserve
1 change: 0 additions & 1 deletion comps/llms/text-generation/tgi/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ docarray[full]
fastapi
huggingface_hub
langchain==0.1.16
langserve
langsmith
opentelemetry-api
opentelemetry-exporter-otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ ENV PYTHONPATH=$PYTHONPATH:/home/user

WORKDIR /home/user/comps/llms/text-generation/vllm

ENTRYPOINT ["python", "llm.py"]
ENTRYPOINT ["bash", "entrypoint.sh"]
8 changes: 8 additions & 0 deletions comps/llms/text-generation/vllm/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

pip --no-cache-dir install -r requirements-runtime.txt

python llm.py
1 change: 1 addition & 0 deletions comps/llms/text-generation/vllm/requirements-runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
langserve
1 change: 0 additions & 1 deletion comps/llms/text-generation/vllm/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ docarray[full]
fastapi
huggingface_hub
langchain==0.1.16
langserve
opentelemetry-api
opentelemetry-exporter-otlp
opentelemetry-sdk
Expand Down
46 changes: 23 additions & 23 deletions comps/ragas/tgi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

FROM langchain/langchain:latest

RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
libgl1-mesa-glx \
libjemalloc-dev \
vim

RUN useradd -m -s /bin/bash user && \
mkdir -p /home/user && \
chown -R user /home/user/

USER user

COPY comps /home/user/comps

RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r /home/user/comps/ragas/tgi/requirements.txt

ENV PYTHONPATH=$PYTHONPATH:/home/user

WORKDIR /home/user/comps/ragas/tgi/

ENTRYPOINT ["python", "llm.py"]
FROM langchain/langchain:latest

RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
libgl1-mesa-glx \
libjemalloc-dev \
vim

RUN useradd -m -s /bin/bash user && \
mkdir -p /home/user && \
chown -R user /home/user/

USER user

COPY comps /home/user/comps

RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r /home/user/comps/ragas/tgi/requirements.txt

ENV PYTHONPATH=$PYTHONPATH:/home/user

WORKDIR /home/user/comps/ragas/tgi/

ENTRYPOINT ["bash", "entrypoint.sh"]
8 changes: 8 additions & 0 deletions comps/ragas/tgi/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

pip --no-cache-dir install -r requirements-runtime.txt

python llm.py
1 change: 1 addition & 0 deletions comps/ragas/tgi/requirements-runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
langserve
1 change: 0 additions & 1 deletion comps/ragas/tgi/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ docarray[full]
fastapi
huggingface_hub
langchain==0.1.16
langserve
langsmith
opentelemetry-api
opentelemetry-exporter-otlp
Expand Down

0 comments on commit 9ecc5c3

Please sign in to comment.