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

Dockerfile improvements: multistage #20

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

mawong-amd
Copy link

@mawong-amd mawong-amd commented May 22, 2024

This PR refactors the ROCm vLLM container to use a multi-stage build process, with a separate stage for each component (wheel or Debian package). This mirrors what is done in the CUDA Dockerfile in upstream, and greatly reduces the build time since all components can be built in parallel.

Python packages are now installed properly to site-packages using pip install *.whl rather than python3 setup.py install or python3 setup.py develop, both of which use egg-links.

It also removes /app/vllm as both a volume and directory to prevent accidental shadowing of the vllm module. If users want a vLLM development directory inside the container, they will have to mount one themselves.

Pending regression tests.

@mawong-amd mawong-amd force-pushed the Dockerfile_multistage_refactor branch from 6a50d7d to 9061bd6 Compare May 22, 2024 18:57
@mawong-amd mawong-amd force-pushed the Dockerfile_multistage_refactor branch from 9061bd6 to 206a720 Compare May 22, 2024 19:13
@mawong-amd mawong-amd force-pushed the Dockerfile_multistage_refactor branch from 206a720 to 34174f8 Compare May 22, 2024 19:27
@mawong-amd mawong-amd marked this pull request as ready for review May 22, 2024 19:46
@hongxiayang
Copy link

Thanks @mawong-amd for this refactoring work. Can you also update build instruction documentation to reflect the change?

@Alexei-V-Ivanov-AMD
Copy link

Looks good to me. Thank you @mawong-amd

Alexei-V-Ivanov-AMD

This comment was marked as duplicate.

Copy link

@Alexei-V-Ivanov-AMD Alexei-V-Ivanov-AMD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shajrawi shajrawi merged commit 23c696d into main May 23, 2024
2 checks passed
@mawong-amd mawong-amd deleted the Dockerfile_multistage_refactor branch May 24, 2024 21:11
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.

5 participants