[Python] I am trying to dockerize a script that i have and i use library parselmouth but i...

Discussão em 'Python' iniciado por Stack, Maio 2, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to dockerize a script that i have and i use library parselmouth but i can't pip install it using my dockerfile this is my requirements.txt

    praat-parselmouth==0.3.3
    pandas
    numpy
    scikit-learn
    librosa
    vad
    noisereduce
    PyWavelets


    And this is my dockerfile

    FROM python:3.10-slim-buster

    # Install system dependencies, Praat, CMake, and additional build tools
    RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    build-essential \
    cmake \
    python3-dev \
    libpython3-dev \
    libgl1-mesa-glx \
    libglib2.0-0 \
    ffmpeg \
    libsndfile1 \
    praat \
    wget \
    git \
    libfftw3-dev \
    libatlas-base-dev \
    curl \
    ca-certificates \
    g++ && \
    # Clean up to reduce image size
    rm -rf /var/lib/apt/lists/*

    # Ensure cmake is installed correctly
    RUN cmake --version

    # Set working directory
    WORKDIR /app
    COPY . /app

    # Upgrade pip to the latest version
    RUN python3 -m pip install --upgrade pip

    # Install Python dependencies
    RUN pip install --no-cache-dir -r requirements.txt

    # Install Parselmouth (Praat interface)
    RUN pip install praat-parselmouth

    # Set the entry point to run your script
    CMD ["python3", "inference_script.py"]


    are their any tips that might make me be able to install it Sorry for not adding the error message Here is it

    101.9 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    101.9 File "/usr/local/lib/python3.10/subprocess.py", line 526, in run
    101.9 raise CalledProcessError(retcode, process.args,
    101.9 subprocess.CalledProcessError: Command '['cmake', '--version']' died with <Signals.SIGTRAP: 5>.
    101.9 [end of output]
    101.9
    101.9 note: This error originates from a subprocess, and is likely not a problem with pip.
    101.9 ERROR: Failed building wheel for praat-parselmouth
    101.9 Running setup.py clean for praat-parselmouth
    102.0 Failed to build praat-parselmouth
    102.4 ERROR: Failed to build installable wheels for some pyproject.toml based projects (praat-parselmouth)
    ------
    Dockerfile:29
    --------------------
    28 | # Install Python dependencies
    29 | >>> RUN python3 -m pip install --upgrade pip && \
    30 | >>> pip install --no-cache-dir -r requirements.txt
    31 |
    --------------------
    ERROR: failed to solve: process "/bin/sh -c python3 -m pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1

    Continue reading...

Compartilhe esta Página