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

[CI/Build] Update Dockerfile.cpu #8505

Closed
wants to merge 1 commit into from
Closed

Conversation

axel7083
Copy link

Use COPY in favor of mount for requirements-x.txt files.

The Dockerfile is using this principle

vllm/Dockerfile

Lines 39 to 42 in fc990f9

COPY requirements-common.txt requirements-common.txt
COPY requirements-cuda.txt requirements-cuda.txt
RUN --mount=type=cache,target=/root/.cache/pip \
python3 -m pip install -r requirements-cuda.txt

but the Dockerfile.cpu is mounting them

vllm/Dockerfile.cpu

Lines 50 to 53 in fc990f9

RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,src=requirements-common.txt,target=requirements-common.txt \
--mount=type=bind,src=requirements-cpu.txt,target=requirements-cpu.txt \
pip install -v -r requirements-cpu.txt

FIX #8502 (link existing issues this PR will resolve)

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@dtrifiro
Copy link
Contributor

The requirements files are already copied in the image later, we have no real benefit in changing this back to COPY.

@axel7083
Copy link
Author

axel7083 commented Sep 16, 2024

The requirements files are already copied in the image later, we have no real benefit in changing this back to COPY.

Yes you are right, however the COPY is after the pip install to let the system cache this layer in case only the source code is changed. Which could be redundant in term of operation, but would fast iteration on building the image.

There are no really advantages in term of performance, the change as explained in #8502 is to allow podman to be used to build the image.

@dtrifiro
Copy link
Contributor

Fix for podman build: #8540

@axel7083
Copy link
Author

Closing as fixed by #8540

@axel7083 axel7083 closed this Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Installation]: Container image do not build Dockerfile.cpu
2 participants