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

Docker build broken #65

Closed
Loqova opened this issue Jun 19, 2022 · 6 comments · Fixed by #66
Closed

Docker build broken #65

Loqova opened this issue Jun 19, 2022 · 6 comments · Fixed by #66

Comments

@Loqova
Copy link

Loqova commented Jun 19, 2022

docker build -t autosub . Cannot build and results in

Step 11/13 : RUN pip3 install --no-cache-dir -r requirements.txt
 ---> Running in bdf3fc44f538
Collecting cycler==0.10.0 (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting numpy (from -r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/45/b2/6c7545bb7a38754d63048c7696804a0d947328125d81bf12beaa692c3ae3/numpy-1.19.5-cp36-cp36m-manylinux1_x86_64.whl (13.4MB)
Collecting stt==1.0.0 (from -r requirements.txt (line 3))
  Could not find a version that satisfies the requirement stt==1.0.0 (from -r requirements.txt (line 3)) (from versions: 0.10.0a5, 0.10.0a6, 0.10.0a8, 0.10.0a9, 0.10.0a10)
No matching distribution found for stt==1.0.0 (from -r requirements.txt (line 3))
The command '/bin/sh -c pip3 install --no-cache-dir -r requirements.txt' returned a non-zero code: 1

@Loqova
Copy link
Author

Loqova commented Jun 19, 2022

I changed the line stt==1.0.0 in the requirements.txt file to stt==0.10.0a10. Build works now. No idea if this breaks something else.

@Loqova
Copy link
Author

Loqova commented Jun 19, 2022

Ok, I would love to use this but after wasting two hours in Python versioning and dependency hell I didn't get it to work at all.

@ghost
Copy link

ghost commented Jun 19, 2022 via email

@abhirooptalasila
Copy link
Owner

setup.py clearly requires python 3.6 or less as DeepSpeech's last supported python version was 3.6. The same goes for the docker build too.
@g3434343 what exactly are you referring to?

@Loqova
Copy link
Author

Loqova commented Jun 20, 2022

@g3434343 seems right. Python isn't my language and that was just confirmed again last night. I spend all night trying to get it to work an didn't, even with python 3.6.0. Installing specific versions and dependencies in Python seems like hell to me.

I tried making an entirely new Docker image, based it on image ubuntu:16.04 (as python 3.6.0 is also ancient). Here are some notes on that progress, unfinished work.

apt update
apt install -y make build-essential libssl-dev zlib1g-dev \
  libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
  libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git ffmpeg

# source /root/.bashrc
# export PATH="$HOME/.pyenv/bin:$PATH"
curl https://pyenv.run | bash
exec $SHELL
pyenv update
pyenv install 3.6.0
pyenv global 3.6.0
python -m pip install --upgrade pip

export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

export PYTHONIOENCODING=utf8

git clone https://github.com/abhirooptalasila/AutoSub.git
cd AutoSub
python setup.py install
pip install .

wget https://coqui.gateway.scarf.sh/dutch/acabunoc/v0.0.1/nl-acabunoc-1-prune-kenlm.scorer
wget https://coqui.gateway.scarf.sh/dutch/acabunoc/v0.0.1/model.pbmm
docker build -t autosubtest .
docker run -it autosubtest /bin/bash

I ran into one problem after another:

  • In requirements.txt I changed stt==1.0.0 to stt==0.10.0a10
  • I changed the with open line in the setup.py file to with open("README.md", encoding="utf8") as fh: to fix an encoding issue.

I think I ended with:

Traceback (most recent call last):
  File "autosub/main.py", line 8, in <module>
    from . import logger
ImportError: cannot import name 'logger'

Still didn't get it to work. I gave up after 4 hours. Maybe I will take a look into it later again.

@abhirooptalasila great you can make things work but you're the developer. You know what is where and how it works. Simply following the provided documentation is frustrating if it doesn't work. Then soon you find yourself reverse engineering and rewriting everything. Docker is exactly for this purpose, to have fixed all proper versions and dependencies packed with each other in an image. The docker build command should work out of the box or a working docker image can be published to Docker Hub.

@Loqova
Copy link
Author

Loqova commented Jun 20, 2022

I didnt't test the mentioned PR yet. However I also upgraded pip and that solved only one issue of many. I doubt that this PR will fix the whole Docker build.

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

Successfully merging a pull request may close this issue.

2 participants