Skip to content

[Installation]: Container image do not build Dockerfile.cpu #8502

Closed
@axel7083

Description

Your current environment

$: podman -v
podman version 5.2.2

How you are installing vllm

$: podman build -f Dockerfile.cpu -t vllm-cpu-env --shm-size=4g .
...
Error: building at STEP "RUN --mount=type=cache,target=/root/.cache/pip --mount=type=bind,src=requirements-build.txt,target=requirements-build.txt pip install --upgrade pip &&     pip install -r requirements-build.txt": resolving mountpoints for container "3a97f46183fa64e10c96f20f9a38a5ed46d2e9e7c4e7bbfbce6fa1adfdacd66e": invalid container path "requirements-build.txt", must be an absolute path

We can see that in the Dockerfile.cpu we are mounting the requirement-*.txt files

--mount=type=bind,src=requirements-build.txt,target=requirements-build.txt \

--mount=type=bind,src=requirements-common.txt,target=requirements-common.txt \

--mount=type=bind,src=requirements-cpu.txt,target=requirements-cpu.txt \

And while they are mounted, no absolute path is provided, leading to the error above.

Solution proposal

+ COPY requirements-build.txt requirements-build.txt
RUN --mount=type=cache,target=/root/.cache/pip \
-    --mount=type=bind,src=requirements-build.txt,target=requirements-build.txt \
    pip install --upgrade pip && \
    pip install -r requirements-build.txt

OR

+ WORKDIR /
RUN --mount=type=cache,target=/root/.cache/pip \
    --mount=type=bind,src=requirements-build.txt,target=requirements-build.txt \
    pip install --upgrade pip && \
    pip install -r requirements-build.txt

According to containers/buildah#4309 a WORKDIR must be defined to use a relative path for target. I opened an issue on the buildah side to have more information containers/buildah#5738

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions