ppwwyyxx / speaker-recognition

A Speaker Recognition System
Apache License 2.0
675 stars 274 forks source link

Problem with run the docker #61

Closed EliranKasif closed 6 years ago

EliranKasif commented 7 years ago

hi, i'm trying to run your project but when i try to install the dependence with the docker i'v got a problem with bob.bio.spear this is the problem i got

Step 15/19 : RUN pip2 install bob.bio.spear ---> Running in 0c95f26152cc Collecting bob.bio.spear Downloading bob.bio.spear-3.1.1.zip (1.3MB) Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Requirement already satisfied: bob.extension in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Requirement already satisfied: bob.blitz in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Requirement already satisfied: bob.core in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Requirement already satisfied: bob.io.base in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Collecting bob.learn.activation (from bob.bio.spear) Downloading bob.learn.activation-2.0.10.zip Collecting bob.math (from bob.bio.spear) Downloading bob.math-3.0.0.zip (93kB) Collecting bob.sp (from bob.bio.spear) Downloading bob.sp-2.0.10.zip (102kB) Collecting bob.ap (from bob.bio.spear) Downloading bob.ap-2.1.5.zip (87kB) Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-ZKdNsn/bob.ap/setup.py", line 42, in bob_packages = bob_packages, File "/usr/local/lib/python2.7/dist-packages/bob/blitz/extension.py", line 52, in init BobExtension.init(self, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/bob/extension/init.py", line 301, in init bob_includes, bob_libraries, bob_library_dirs, bob_macros = get_bob_libraries(self.bob_packages) File "/usr/local/lib/python2.7/dist-packages/bob/extension/init.py", line 193, in get_bob_libraries pkg = importlib.import_module(package) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) ImportError: No module named sp

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ZKdNsn/bob.ap/ The command '/bin/sh -c pip2 install bob.bio.spear' returned a non-zero code: 1

----------------------------------------

egg_info

how i can run your program?

Fritskee commented 7 years ago

I have the exact same issue!!!

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-UmHkNE/bob.ap/ The command '/bin/sh -c pip2 install bob.bio.spear' returned a non-zero code: 1

EDIT:

You need to go to the Dockerfile and change the order of the "RUN pip2 install bob.sp" and place it ABOVE "RUN pip2 install bob.spear"

EliranKasif commented 7 years ago

thank you but its didn't work for me... this is the new message problem Step 15/19 : RUN pip2 install bob.sp ---> Using cache ---> ae78f1545af4 Step 16/19 : RUN pip2 install bob.bio.spear ---> Running in 4590099010b4 Collecting bob.bio.spear Downloading bob.bio.spear-3.1.1.zip (1.3MB) Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Requirement already satisfied: bob.extension in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Requirement already satisfied: bob.blitz in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Requirement already satisfied: bob.core in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Requirement already satisfied: bob.io.base in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Collecting bob.learn.activation (from bob.bio.spear) Downloading bob.learn.activation-2.0.10.zip Collecting bob.math (from bob.bio.spear) Downloading bob.math-3.0.0.zip (93kB) Requirement already satisfied: bob.sp in /usr/local/lib/python2.7/dist-packages (from bob.bio.spear) Collecting bob.ap (from bob.bio.spear) Downloading bob.ap-2.1.5.zip (87kB) Collecting bob.learn.linear (from bob.bio.spear) Downloading bob.learn.linear-2.1.2.zip (197kB) Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-chQICG/bob.learn.linear/setup.py", line 50, in boost_modules = boost_modules, File "/usr/local/lib/python2.7/dist-packages/bob/blitz/extension.py", line 52, in init BobExtension.init(self, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/bob/extension/init.py", line 301, in init bob_includes, bob_libraries, bob_library_dirs, bob_macros = get_bob_libraries(self.bob_packages) File "/usr/local/lib/python2.7/dist-packages/bob/extension/init.py", line 193, in get_bob_libraries pkg = importlib.import_module(package) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) ImportError: No module named math

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-chQICG/bob.learn.linear/

Fritskee commented 7 years ago

You're right, I ended up having the same error. After trying to shuffle them in all different kinds of orders and adding the missing dependencies from the bob toolkit, I just went with commenting out all the bob related stuff.

@ppwwyyxx do you happen to have a better solution?

dusj commented 7 years ago

I had tried many times and the code below works for me.

RUN pip2 install scipy scikit-learn scikits.talkbox numpy pyside pyssp PyAudio argparse h5py RUN pip2 install bob.extension RUN pip2 install bob.blitz RUN pip2 install bob.core RUN pip2 install bob.io.base RUN pip2 install bob.learn.activation RUN pip2 install bob.math RUN pip2 install bob.sp RUN pip2 install bob.learn.linear RUN pip2 install bob.bio.spear

EliranKasif commented 7 years ago

Thanx, but i didnt find the path to the python file like its wrote in the ENTRYPOINT in the docker. and i got this message:sudo docker build -f Dockerfile -t speaker-recognition . Sending build context to Docker daemon 7.68kB Step 1/22 : FROM ubuntu ---> dd6f76d9cc90 Step 2/22 : ENV DEBIAN_FRONTEND noninteractive ---> Using cache ---> 003b875f3a18 Step 3/22 : RUN apt-get update && apt-get install -y nano sudo tzdata apt-utils && apt-get -y dist-upgrade ---> Using cache ---> c216fab917a3 Step 4/22 : RUN rm /etc/localtime && echo "Australia/Sydney" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata ---> Using cache ---> 83f7d86c25ee Step 5/22 : ENV USERNAME guiuser ---> Using cache ---> ccf0a1fa0093 Step 6/22 : RUN useradd -m $USERNAME && echo "$USERNAME:$USERNAME" | chpasswd && usermod --shell /bin/bash $USERNAME && usermod -aG sudo $USERNAME && echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && chmod 0440 /etc/sudoers.d/$USERNAME && usermod --uid 1000 $USERNAME && groupmod --gid 1000 $USERNAME ---> Using cache ---> 2d245ab422cd Step 7/22 : RUN apt-get update && apt-get install -y python python-pip && pip2 list --outdated | cut -d' ' -f1 | xargs -n 1 pip2 install --upgrade ---> Using cache ---> 058a8f1a2b19 Step 8/22 : RUN apt-get install -y portaudio19-dev libopenblas-base libopenblas-dev pkg-config git-core cmake python-dev liblapack-dev libatlas-base-dev libblitz0-dev libboost-all-dev libhdf5-serial-dev libqt4-dev libsvm-dev libvlfeat-dev python-nose python-setuptools python-imaging build-essential libmatio-dev python-sphinx python-matplotlib python-scipy ---> Using cache ---> eeab45b4b205 Step 9/22 : RUN apt-get install -y libfftw3-dev libtiff5-dev libgif-dev libpng-dev libjpeg-dev ---> Using cache ---> 433c7267e0f5 Step 10/22 : RUN pip2 install scipy scikit-learn scikits.talkbox numpy pyside pyssp PyAudio argparse h5py ---> Using cache ---> 2a24735efd92 Step 11/22 : RUN pip2 install bob.extension ---> Using cache ---> e5f57c5c0592 Step 12/22 : RUN pip2 install bob.blitz ---> Using cache ---> 96228851f5ac Step 13/22 : RUN pip2 install bob.core ---> Using cache ---> a1863648f9a3 Step 14/22 : RUN pip2 install bob.io.base ---> Using cache ---> 60c2fa91c95a Step 15/22 : RUN pip2 install bob.learn.activation ---> Using cache ---> e7f98b6782c3 Step 16/22 : RUN pip2 install bob.math ---> Using cache ---> 5fd47629ac90 Step 17/22 : RUN pip2 install bob.sp ---> Using cache ---> 7a45e8afa30f Step 18/22 : RUN pip2 install bob.learn.linear ---> Using cache ---> e13c9bccff58 Step 19/22 : RUN pip2 install bob.bio.spear ---> Using cache ---> f78dbea2af7c Step 20/22 : RUN cd ~/ && git clone https://github.com/ppwwyyxx/speaker-recognition.git && cd ~/speaker-recognition && make -C src/gmm ---> Using cache ---> 4853644912ec Step 21/22 : RUN apt-get clean &&apt-get autoremove -y && rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/* ---> Using cache ---> bd44d0310795 Step 22/22 : ENTRYPOINT /usr/bin/python /root/speaker-recognition/src/speaker-recognition.py ---> Using cache ---> d5bb8dfe35ed [WARNING]: Empty continuation line found in: RUN useradd -m $USERNAME && echo "$USERNAME:$USERNAME" | chpasswd && usermod --shell /bin/bash $USERNAME && usermod -aG sudo $USERNAME && echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && chmod 0440 /etc/sudoers.d/$USERNAME && usermod --uid 1000 $USERNAME && groupmod --gid 1000 $USERNAME [WARNING]: Empty continuation lines will become errors in a future release. Successfully built d5bb8dfe35ed Successfully tagged speaker-recognition:latest

qacollective commented 6 years ago

Hi,

Sorry when I authored the Dockerfile, the first line was just FROM ubuntu which worked for me at the time I was building it, but that will always retrieve the latest ubuntu version. Now that time has moved on, the ubuntu image and package repositories have changed which may have been a source of difficulty.

I've just successfully built the Docker image again on ubuntu 16.04 so I'll submit a pull request to make those changes.

From then, the only other source of potential error is that the repositories (either ubuntu or python) change and no longer play nice together. This is why Docker has the Docker Hub so we can share working images. Accordingly, I've uploaded my working image. So now you can get a working version of this project from the command line by simply typing docker pull qacollective/ppwwyyxx-speaker-recognition

qacollective commented 6 years ago

This issue can be closed.