-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix torch-npu dependency #4561
fix torch-npu dependency #4561
Conversation
cc @MengqingCao |
@hashstone Thanks for the fix! But the installation of torch-npu differs by architecture. Maybe adding a dependency "torch-npu-x86" in |
f1ed2bc
to
bdda082
Compare
@MengqingCao have modified as your proposal, please review. |
docker/docker-npu/Dockerfile
Outdated
@@ -1,28 +1,35 @@ | |||
# Use the Ubuntu 22.04 image with CANN 8.0.rc1 | |||
# More versions can be found at https://hub.docker.com/r/cosdt/cann/tags | |||
FROM cosdt/cann:8.0.rc1-910b-ubuntu22.04 | |||
FROM --platform=$TARGETPLATFORM cosdt/cann:8.0.rc1-910b-ubuntu22.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be done automatically by docker. let's use uname -i
to get the architecture info.
docker/docker-npu/Dockerfile
Outdated
|
||
# Copy the rest of the application into the image | ||
COPY . /app | ||
|
||
# Install the LLaMA Factory | ||
RUN EXTRA_PACKAGES="torch-npu,metrics"; \ | ||
RUN EXTRA_PACKAGES="metrics"; \ | ||
if [ "$TARGETPLATFORM" == "linux/arm64" ]; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ "$(uname -i)" == "aarch64" ]; then \
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did some modifications and this pr can be merged
Hi @hashstone , if possible, could you please help us verify whether the problem has been fixed or not, using the current version: https://github.com/hiyouga/LLaMA-Factory/blob/main/docker/docker-npu/Dockerfile ? thanks! |
In my local build env, cross building through |
Great news, thanks for the verification |
What does this PR do?
Fix torch-npu dependency problem like this
Before submitting