mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #1738] [Usage]: How to compile transfer engine wheel cp312 #503
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#503
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @easonyang1010 on GitHub (Mar 24, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/1738
Originally assigned to: @staryxchen on GitHub.
Describe your usage question
when I use this command, still got cp310 wheel
docker build -f docker/mooncake.Dockerfile \ --build-arg PYTHON_VERSION=3.12 \ --build-arg EP_TORCH_VERSIONS="2.9.1" \ -t mooncake:from-source .Looking forward to your reply
Before submitting a new issue...
@staryxchen commented on GitHub (Mar 25, 2026):
Hi @easonyang1010, thanks for reporting this!
The root cause is that
mooncake.Dockerfilewas installing the Ubuntu system Python (python3= 3.10 on Ubuntu 22.04) regardless of thePYTHON_VERSIONbuild-arg, andbuild_wheel.shwas callingpython -m buildusing the system default interpreter — so the wheel ABI tag was alwayscp310.We've submitted a fix in #1745. Could you give it a try by building from that branch?
You should now get a
cp312wheel. Please let us know if it works for you!@easonyang1010 commented on GitHub (Mar 25, 2026):
Sure, I would love to give it a try
@easonyang1010 commented on GitHub (Mar 26, 2026):
After testing, this indeed solves the problem.Thanks!
@easonyang1010 commented on GitHub (Apr 8, 2026):
@staryxchen hi, I found your commit can produce cp312 wheel, but when using this cp312 wheel, error occurs
ImportError: Python version mismatch: module was compiled for Python 3.10, but the interpreter version is incompatible: 3.12.11this is build log
@staryxchen commented on GitHub (Apr 8, 2026):
Hi @easonyang1010, thanks for the follow-up — you're right, the previous fix only corrected the wheel ABI tag but the C++ extensions (pybind11
.sofiles) were still compiled against Python 3.10.The root cause was that CMake's
find_package(Python3)and pybind11'sFindPythonInterpwere still discovering the system Python 3.10 during the build, ignoring thePYTHON_VERSIONbuild-arg.I've pushed additional fixes to #1745:
-DPython3_EXECUTABLEto CMake sofind_package(Python3)picks up the correct interpreterPYTHON_EXECUTABLEbeforeadd_subdirectory(pybind11)so pybind11's legacyFindPythonInterpalso uses the right PythonCould you give it another try?
This time the CMake output should show
Found Python3: /usr/bin/python3.12(instead of 3.10). Let us know if it works!@easonyang1010 commented on GitHub (Apr 9, 2026):
@staryxchen Hi, I have tried this solution, it does solve problems.