-
Notifications
You must be signed in to change notification settings - Fork 876
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
wheels for ARM64 Linux #23
Comments
Thanks for the suggestion, but not planning on providing aarch64 wheels for now. In order to build and test aarch64 wheels in Github Actions, I'd need to use emulation, which is super slow and a pain to setup. I'll leave this issue open for a bit, if this proves to be a popular request I might reconsider. |
We would definitely appreciate this as well for use in our docker images in the Haystack library |
+1, need the wheel |
+1, without a wheel our team can't easily install this library in the local dev environment, making it a pain to use. |
+1 on having the wheel! Developing on an M1 mac w/ Docker becomes difficult without it. FROM python:3.11-slim-bullseye as builder
# Tiktoken requires Rust toolchain, so build it in a separate stage
RUN apt-get update && apt-get install -y gcc curl
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && apt-get install --reinstall libc6-dev -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN pip install --upgrade pip && pip install tiktoken
FROM python:3.11-slim-bullseye
...
# Copy pre-built packages from builder stage
COPY --from=builder /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/
# Now install packages as normal — tiktoken will already be installed and skipped if present in requirements.txt
RUN pip install --upgrade pip && pip install -r requirements.txt
... |
RUN pip install --upgrade pip && pip3 install tiktoken: |
+1 on needing the wheel, tiktoken is essential for many libraries and it avoids people from building docker image locally. |
+1 on the wheel as well! Appreciate any prioritization. |
There's enough interest here that this is definitely something we should make happen. For various reasons, I've been short on time recently so can't commit to a timeline — but if someone opens a PR I will review and merge. I copied over the QEMU setup I have from a different C project I maintain in #54 ; unfortunately it looks like it didn't just work. Maybe it's obvious to someone here what's wrong? |
@hauntsaninja It looks like a SIGKILL since it says exit code -9; is it possible that the runner's system memory was not enough? Could we try with a larger runner? |
Hello, I want to run tiktoken on arm64 server through docker, what should I do wrong now I tried #23 (comment) But #23 (comment) |
I think it might just need to set a env var |
Me too. |
I've released 0.3.1 along with aarch64 wheels. Thanks @messense for the cargo environment variable fix! |
The package Tiktoken, defined in requirements.txt, needs to be build using a newer version of the rust compiler than the one provided by the python:3 image. The solution was to download and install the newest version or Rust. More information see this thread: openai/tiktoken#23
When attempting to install
tiktoken
in a thepython:3.11-slim
Docker container running in Docker for Mac, I get an error about a missing rust compiler(error: can't find Rust compiler...
).I'm not familiar with the Rust toolchain but I believe it should be possible to compile for
aarch64
by add the following:rustup target add aarch64-unknown-linux-gnu
in pyproject.toml.As a workaround, I'm just building from source, but it'd be super nice to have pre-built wheels.
My workaround:
The text was updated successfully, but these errors were encountered: