[Installation]: Container image do not build Dockerfile.cpu #8502
Closed
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
Line 29 in fc990f9
Line 51 in fc990f9
Line 52 in fc990f9
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.