простите меня снова ))) Уже что только не прописывал в докерфайле, браз за основу тот, что скидывали, прописывал разные версии torch, то какой-нибудь из атрибутов не нравится, то ругается, на то, что numpy ннеобходит от версии 2.0. Сейчас dockerfile выглядит так:
FROM python:3.9
RUN python -m pip install --no-cache-dir \
psycopg2 \
python-crfsuite \
gdown==3.3.1 \
pathlib \
numpy==2.0.0 \
pandas \
scikit-learn \
tqdm \
requests \
sentencepiece \
protobuf
RUN python -m pip install --no-cache-dir \
git+https://github.com/Koziev/rulemma \
git+https://github.com/Koziev/rupostagger \
git+https://github.com/Koziev/rutokenizer \
python-crfsuite \
git+https://github.com/Koziev/ruword2tags \
git+https://github.com/Koziev/rusyllab \
gdown==3.3.1 \
pathlib
# Установка Torch с явным указанием версий для CPU
RUN python -m pip install --no-cache-dir \
torch==2.1.0 \
torchvision==0.16.0 \
torchaudio==2.1.0 \
--index-url https://download.pytorch.org/whl/cpu
RUN python -m pip install --no-cache-dir transformers
WORKDIR /app
подскажите пожалуйста что поправить, ругается на данный момент на
FROM python:3.9
# Установка системных зависимостей
RUN apt-get update && apt-get install -y \
git \
gcc \
g++ \
libsox-dev \
&& rm -rf /var/lib/apt/lists/*
# Установка PyTorch для CPU
RUN pip install --no-cache-dir \
torch --index-url https://download.pytorch.org/whl/cpu
# Установка transformers
RUN python -m pip install --no-cache-dir transformers
# Установка Python‑пакетов с фиксированными версиями
RUN python -m pip install --no-cache-dir \
psycopg2 \
pandas \
scikit-learn \
tqdm \
requests \
sentencepiece \
protobuf \
python-crfsuite \
gdown \
pathlib
# Установка специализированных пакетов из GitHub
RUN pip install --no-cache-dir \
git+https://github.com/Koziev/rulemma \
git+https://github.com/Koziev/rupostagger \
git+https://github.com/Koziev/rutokenizer \
git+https://github.com/Koziev/ruword2tags \
git+https://github.com/Koziev/rusyllab
WORKDIR /app
FROM python:3.9
RUN pip install --no-cache-dir \
torch --index-url https://download.pytorch.org/whl/cpu
# Установка transformers
RUN python -m pip install --no-cache-dir transformers
RUN python -m pip install --no-cache-dir psycopg2
RUN python -m pip install --no-cache-dir \
git+https://github.com/Koziev/rulemma \
git+https://github.com/Koziev/rupostagger \
git+https://github.com/Koziev/rutokenizer \
python-crfsuite \
git+https://github.com/Koziev/ruword2tags \
git+https://github.com/Koziev/rusyllab \
gdown==3.3.1 \
pathlib
WORKDIR /app
Фотография
нажмите — покажем
нажмите — покажем
А может быть, что при установке torch RUN pip install git+https://github.com/wenet-e2e/wespeaker.git ставится torch 2.12.1, а в совместимой версии torchaudio нет атрибута set_audio_backend, поэтому хоть жестко прописывай версии, хоть нет в Dockerfile.text_processing, все обращения идут на торч 2.12.1, у которого нужного атрибута нет?
так и есть, если в файле Dockerfile.base_audio_process_v2 в конце прописать RUN pip install --force-reinstall --no-cache-dir \
torch==1.13.1 \
--index-url https://download.pytorch.org/whl/cpu и ошибка по атрибуту set_audio_backend уйдет, но соответственно появится ошибка, которая говорит, что модулю такому-то нужна версия торч 2.4. Вопрос как быть и что делать!?