opea-project / GenAIExamples

Generative AI Examples is a collection of GenAI examples such as ChatQnA, Copilot, which illustrate the pipeline capabilities of the Open Platform for Enterprise AI (OPEA) project.
https://opea.dev
Apache License 2.0
220 stars 135 forks source link

[Bug] Instructions to build a Docker image is not complete - missing PYTHONPATH #749

Open arun-gupta opened 1 week ago

arun-gupta commented 1 week ago

Priority

Undecided

OS type

Mac

Hardware type

CPU-other (Please let us know in description)

Installation method

Deploy method

Running nodes

Single Node

What's the version?

Latest

Description

Building a Docker image expects PYTHONPATH to be set up. Here is the error that it gives:

10.22 Building dependency tree...
10.22 Reading state information...
10.22 E: Unable to locate package libgl1-mesa-glx
10.22 E: Unable to locate package libjemalloc-dev
------

 1 warning found (use --debug to expand):
 - UndefinedVar: Usage of undefined variable '$PYTHONPATH' (line 24)
Dockerfile:8
--------------------
   7 |     
   8 | >>> RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
   9 | >>>     libgl1-mesa-glx \
  10 | >>>     libjemalloc-dev
  11 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update -y && apt-get install -y --no-install-recommends --fix-missing     libgl1-mesa-glx     libjemalloc-dev" did not complete successfully: exit code: 100

This requirement is not specified in the instructions anywhere.

Reproduce steps

~/workspaces/GenAIComps% docker build -t arungupta/embedding-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/embeddings/langchain/docker/Dockerfile .

Raw log

No response

xiguiw commented 1 week ago

@arun-gupta

From the log, the error is apt install fail to locate package libgl1-mesa-glx and libjemalloc-dev

10.22 E: Unable to locate package libgl1-mesa-glx
10.22 E: Unable to locate package libjemalloc-dev

It is the error of this command: apt-get update -y && apt-get install -y --no-install-recommends --fix-missing libgl1-mesa-glx libjemalloc-dev

Would you please try the command again?

$PYTHONPATH is a warning. UndefinedVar: Usage of undefined variable '$PYTHONPATH' (line 26)

(base) xiguiwan@rasp-AvenueCity:~/OPEA/GenAIComps$ docker build --no-cache -t opea/embedding-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$htt -f comps/embeddings/langchain/docker/Dockerfile .
[+] Building 281.0s (11/11) FINISHED                                                                                                                            docker:d
 => [internal] load build definition from Dockerfile
 => => transferring dockerfile: 820B
 => WARN: UndefinedVar: Usage of undefined variable '$PYTHONPATH' (line 26)
 => [internal] load metadata for docker.io/langchain/langchain:latest
 => [internal] load .dockerignore
 => => transferring context: 2B
 => CACHED [1/6] FROM docker.io/langchain/langchain:latest
 => [internal] load build context
 => => transferring context: 363.92kB
 => [2/6] RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing     libgl1-mesa-glx     libjemalloc-dev     vim
 => [3/6] RUN useradd -m -s /bin/bash user &&     mkdir -p /home/user &&     chown -R user /home/user/
 => [4/6] COPY comps /home/user/comps
 => [5/6] RUN pip install --no-cache-dir --upgrade pip &&     if [ cpu = "cpu" ]; then pip install torch --index-url https://download.pytorch.org/whl/cpu; fi &&     p
 => [6/6] WORKDIR /home/user/comps/embeddings/langchain
 => exporting to image
 => => exporting layers
 => => writing image sha256:9ba3a4640034d939dc7e4ee519dc9101a08e525730b046d14a2923c25adbc70a
 => => naming to docker.io/opea/embedding-tei:latest

 1 warning found (use docker --debug to expand):
 - UndefinedVar: Usage of undefined variable '$PYTHONPATH' (line 26)
arun-gupta commented 1 week ago

I'm building this on a Mac. So apt-get would not work as is. Where do you want me to try this?

xiguiw commented 6 days ago

I'm building this on a Mac. So apt-get would not work as is. Where do you want me to try this?

@arun-gupta So this is not a build issue. It's request to support Mac.

You can raise a new ticket to ask for support Mac and close this one.