Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce 'entrypoint.sh' for some Containers #274

Merged
merged 9 commits into from
Jul 5, 2024
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
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
chensuyue marked this conversation as resolved.
Show resolved Hide resolved

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
Loading