[Python] Impossible to install python deps with conda using bash script

Discussão em 'Python' iniciado por Stack, Agosto 21, 2025.

  1. Stack

    Stack Membro Participativo

    tried writing a script to aumatically download and install some dependencies i need.

    Is not possible to install such dependencies directly i already tried and it istalls the wrong version which is incompatible with my code

    when i try to execute the script inside the container worked without a fuss

    the script is compile.sh

    dockerfile:

    FROM mambaorg/micromamba:2.3.1-ubuntu24.10
    USER root
    RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    wget \
    nano \
    git \
    tcsh\
    ninja-build \
    meson

    COPY ./app /home/screener
    WORKDIR /home/screener/install
    RUN chmod +x ./compile.sh

    WORKDIR /home/screener
    #create env from screener-lock #-f /home/screener/app/env/screener.yml
    RUN micromamba create -n Screener -f ./env/screener.yml
    RUN micromamba run -n Screener pip install --upgrade pip

    USER $MAMBA_USER

    #RUN micromamba install -n Screener <chem_data package>
    #RUN micromamba env -n Screener export > /home/screener/env/screener.yml
    RUN /home/screener/install/compile.sh

    CMD ["/bin/bash"]


    I get this error while running it into the docker file

    #14 [8/8] RUN /home/screener/install/compile.sh

    #14 0.246 fatal: could not create work tree dir 'Meeko': Permission denied

    #14 0.246 /home/screener/install/compile.sh: line 9: cd: Meeko: No such file or directory

    #14 0.247 fatal: not a git repository (or any of the parent directories): .git

    #14 0.544 Defaulting to user installation because normal site-packages is not writeable

    #14 0.808 ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

    #14 0.866 Cloning into 'scrubber'...

    #14 2.230 Defaulting to user installation because normal site-packages is not writeable

    #14 2.275 Processing /home/scrubber

    #14 2.277 Installing build dependencies: started

    #14 3.353 Installing build dependencies: finished with status 'done'

    #14 3.354 Getting requirements to build wheel: started

    #14 3.660 Getting requirements to build wheel: finished with status 'done'

    #14 3.661 Preparing metadata (pyproject.toml): started

    #14 3.860 Preparing metadata (pyproject.toml): finished with status 'done'

    #14 3.863 Requirement already satisfied: rdkit>=2022.03.1 in /opt/conda/envs/Screener/lib/python3.12/site-packages (from molscrub==0.1.1) (2025.3.5)

    #14 3.864 Building wheels for collected packages: molscrub

    #14 3.865 Building wheel for molscrub (pyproject.toml): started

    #14 4.113 Building wheel for molscrub (pyproject.toml): finished with status 'done'

    #14 4.114 Created wheel for molscrub: filename=molscrub-0.1.1-py3-none-any.whl size=62740 sha256=68204259f3e28cadb62b3bbcd27ad6be088ee7c675900b3d25e67069e0559628

    #14 4.114 Stored in directory: /tmp/pip-ephem-wheel-cache-1k4h4pde/wheels/b5/a0/7e/f876af6b556ae4e28baf7845bbfdac9b0f9ff9a04e96710778

    #14 4.117 Successfully built molscrub

    #14 4.191 Installing collected packages: molscrub

    #14 4.223 Successfully installed molscrub-0.1.1

    #14 DONE 4.3s


    compile.sh

    #rdkit six from meeko
    git clone https://github.com/forlilab/Meeko.git
    cd Meeko
    git checkout develop
    micromamba run -n Screener pip install . --use-pep517 .
    cd ..
    rm -rf Meeko

    #install scrubber
    git clone https://github.com/forlilab/scrubber.git
    cd scrubber
    micromamba run -n Screener pip install --use-pep517 .
    cd ..
    rm -rf scrubber

    Continue reading...

Compartilhe esta Página