Open AlejandroIglesiasCalvo opened 1 year ago
Hello, I encountered the same problem, but when trying to run on android (termux, pydroid). I tried everything and did not install this tiktoken. Either Rust asks, although when installing it at the very end, some error comes out.
I have continued investigating, and even trying to install tiktoken separately (the only "solution" I found) gives me an error. The dockerfile with the "solution" is: FROM python:3.11-slim-bullseye as builder
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 --from=builder /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/ COPY --from=builder /root/.cargo /root/.cargo
ENV PYTHONFAULTHANDLER=1 \ PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ PIP_DISABLE_PIP_VERSION_CHECK=on\ CARGO_NET_GIT_FETCH_WITH_CLI="true"
WORKDIR /app COPY . .
RUN pip install --upgrade pip && pip install -r requirements.txt
CMD ["python", "bot/main.py"]
But it doesn't work, I keep investigating. 😔😔
Try to useFROM rust:slim-bookworm
andapt update && apt install pip
,at lastpython3 main.py
?It may work.
For me Tiktoken compiled when I installed the rust and cargo packages: (don't know if all packages are needed)
RUN apk --no-cache add ffmpeg python3-dev gcc curl libc-dev clang lld cargo rust
I'm on odroidxu4 with armv7
For me Tiktoken compiled when I installed the rust and cargo packages: (don't know if all packages are needed)
RUN apk --no-cache add ffmpeg python3-dev gcc curl libc-dev clang lld cargo rust
I'm on odroidxu4 with armv7
Can you share Dockerfile? I tried what you wrote but it didn't work. I have armv7 too...
I just opened a PR with a dockerfile that works for me on the raspberry pi 3: #472
Discussed in https://github.com/n3d1117/chatgpt-telegram-bot/discussions/127