Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eynollah command doesnt do anything nor log errors inside docker container #120

Closed
FabricioTeran opened this issue Mar 14, 2024 · 7 comments

Comments

@FabricioTeran
Copy link

I have tried every possible way to run eynollah but its like i have runed nothing inside docker container, python 3.9, tensorflow 2.16.1 . The program simply doesnt run without logging anything

@cneud
Copy link
Member

cneud commented Mar 14, 2024

Hello @FabricioTeran - some more info is needed to figure out what is the problem. I understand that you are using Eynollah via Docker - I assume with a Linux-based container? How did you install Eynollah, from source or from a release via PyPi? What error message is being shown when you try to run Eynollah via the command line?

@FabricioTeran
Copy link
Author

FabricioTeran commented Mar 14, 2024

Thank you for the fast answer, im in ubuntu 22.04, with last version of docker and docker desktop, mi Dockerfile looks like:

FROM ubuntu:22.04

ENV TZ=US \
    DEBIAN_FRONTEND=noninteractive

#Python 3.9.1 install
RUN apt update
RUN apt install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev 
RUN apt install -y wget curl llvm libncurses5-dev libncursesw5-dev xz-utils 
RUN apt install -y tk-dev libffi-dev liblzma-dev python3-openssl git
WORKDIR /python39
RUN wget https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz ;\
    tar -xf Python-3.9.1.tgz
WORKDIR /python39/Python-3.9.1 
RUN ./configure --enable-optimizations
RUN make -j$(nproc)
RUN make install

RUN python3.9 -m pip install tensorflow[and-cuda]

WORKDIR /app

#eynollah install
RUN wget https://qurator-data.de/eynollah/2022-04-05/models_eynollah_renamed_savedmodel.tar.gz ;\
    tar -xvzf models_eynollah_renamed_savedmodel.tar.gz
RUN python3.9 -m pip install eynollah

WORKDIR /mon

My docker-compose.yml looks like:

services:
  app:
    build: .
    image: ubupy39cuda
    volumes:
      - ./:/mon

The /mon folder is a bind mount, and the image im65.tiff is inside, running an ls inside container shows up the file, so file must be visible for the program. And it's the same with the folder that contains the model.
And inside the container i run eynollah -i ./im65.tiff -o ./ -m /app/models_eynollah_renamed_savedmodel -fl but it doesnt even show any errors, simply does nothing

@cneud
Copy link
Member

cneud commented Mar 15, 2024

Thanks. Still investigating...but at least I found out that Tensorflow >=2.16 pulls Keras 3, with which we are not yet compatible.

Can you please try with a Tensorflow version between 2.12 and 2.15?

@FabricioTeran
Copy link
Author

FabricioTeran commented Mar 18, 2024

Hi, i have tried with tensorflow 2.12 and now works fine, it doesnt work with tensorflow 2.14 nor 2.15 with something related to keras.backend that cannot import some function, the log was:
from keras.backend import set_session ImportError: cannot import name 'set_session' from 'keras.backend' (/usr/local/lib/python3.9/site-packages/keras/backend/__init__.py)

@cneud
Copy link
Member

cneud commented Mar 19, 2024

Thank you for reporting back. Glad to hear it works for you with tensorflow 2.12, which I have pinned for now until we can fix compatibility with newer TF/Keras versions.

The error should also be gone with the fix from #121 (comment).

We still need to fix a nasty regression before I can make a new release on PyPI, so for now the fix is only applied when installing from source.

Can we close this here?

@FabricioTeran
Copy link
Author

FabricioTeran commented Mar 21, 2024

Hi, sure, close this

@cneud
Copy link
Member

cneud commented Mar 22, 2024

Thanks for opening the other question in another issue - this helps us to keep an overview and track progress towards separate issues. Closing this now.

@cneud cneud closed this as completed Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants