Segmentation Fault
#35
by
loretoparisi
- opened
This error happens with all the following:
FROM python:3.9.7-slim-bullseye
FROM python:3.10.13-bullseye
FROM python:3.8-slim-buster
and
root@0ac58308616e:/app# python -c "import torch; print(torch.__version__);"
2.1.0
root@0ac58308616e:/app# python -c "import transformers; print(transformers.__version__);"
4.34.1
root@0ac58308616e:/app# python -c "import sentence_transformers; print(sentence_transformers.__version__);"
2.2.2
Stacktrace:
Segmentation fault
root@0ac58308616e:/app# /usr/local/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
Code:
from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]
model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
embeddings = model.encode(sentences)
print(embeddings)
or the example via transformers
.
My requirements.txt
is
typing-extensions
numpy
diskcache
voyager
torch
transformers
sentence-transformers
optimum
onnx
onnxruntime
In the Dockerfile I'm installing
RUN apt-get update && apt-get install -y \
software-properties-common \
build-essential \
pkg-config \
ninja-build \
libopenblas-dev \
python3-pip \
curl
Submitted this issue here https://stackoverflow.com/questions/77347618/sentence-transformers-segmentation-fault