Dockerfile build issue

Can we please stick to one problem at a time? Also, “segfault” with regenerated lm.binary is proved by many examples on the forum to be people improperly following documentation and producing broken files. We can’t help with that.

Before i change the file, the content as below

…/…/VERSION

Could you please be as explicite as possible to avoid any ambiguity? Please use cat and copy/paste full command line and output. Otherwise we made no progress.

Sorry for the inconvenience. I have been using the wrong reference function.

the content of the VERSION file as below:
root@4d8a33df56c5:/DeepSpeech# cat /usr/local/lib/python3.6/dist-packages/deepspeech_training/VERSION
../../VERSION

I still don’t see a cat nor a ls. So I don’t know if it’s a broken file, a symlink improperly read, …

Now, ls -hal /usr/local/lib/python3.6/dist-packages/deepspeech_training/VERSION

root@4d8a33df56c5:/DeepSpeech# ls -hal /usr/local/lib/python3.6/dist-packages/deepspeech_training/VERSION
-rwxr-xr-x 1 root staff 14 4月 27 14:46 /usr/local/lib/python3.6/dist-packages/deepspeech_training/VERSION

So, it’s a flat file instead of a symlink. Try and nchange the pip install step of the Dockerfile to the documented one:

pip3 install --upgrade pip==20.0.2 wheel==0.34.2 setuptools==46.1.3
pip3 install --upgrade --force-reinstall -e .

insert the pip install command after Install pip step and build the DeepSpeech image again, right?

change the current one with those two.

Thank you very much.

Changed and rebuilding the DeepSpeech.

And it should be finish after 2 hour later.

Sorry for the inconvenience again.

After rebuild the image, i will RUN
python3 -m venv $HOME/tmp/deepspeech-train-venv/
in the image first.

If it works, either there in a bug when we install deepspeech_training differently than what we have in the doc (and it could be a bug) or it’s something else …

I will update the status after finish the rebuilding tomorrow.

Thank you very much.

1 Like
Step 7/74 : RUN apt-get --no-install-recommends install -qq -y cuda-command-line-tools-10-0
 ---> Running in 9d1cea5efb4e
Removing intermediate container 9d1cea5efb4e
 ---> c9b6b4b7f2dd
Step 8/74 : RUN pip3 install --upgrade pip==20.0.2 wheel==0.34.2 setuptools==46.1.3
 ---> Running in 86f7b2125954
Collecting pip==20.0.2
  Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
Collecting wheel==0.34.2
  Downloading https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl
Collecting setuptools==46.1.3
  Downloading https://files.pythonhosted.org/packages/a0/df/635cdb901ee4a8a42ec68e480c49f85f4c59e8816effbf57d9e6ee8b3588/setuptools-46.1.3-py3-none-any.whl (582kB)
Installing collected packages: pip, wheel, setuptools
  Found existing installation: pip 9.0.1
    Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
  Found existing installation: wheel 0.30.0
    Not uninstalling wheel at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed pip-20.0.2 setuptools-46.1.3 wheel-0.34.2
Removing intermediate container 86f7b2125954
 ---> 995f554146e9
Step 9/74 : RUN pip3 install --upgrade --force-reinstall -e .
 ---> Running in 486e76d0a9e9
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /
The command '/bin/sh -c pip3 install --upgrade --force-reinstall -e .' returned a non-zero code: 1

I paste it at the wrong place?

Yes. Leave the part that installs pip itself alone. You want to change the part that installs the training code: https://github.com/mozilla/DeepSpeech/blob/6e9b251da27cac697783b4076f9128d6c2d5467f/Dockerfile#L152

Replace it with:

RUN pip3 install --upgrade pip==20.0.2 wheel==0.34.2 setuptools==46.1.3
RUN DS_NODECODER=1 pip3 install --no-cache-dir --upgrade --force-reinstall -e .
1 Like

Thank you very much. The rebuilding is successful.

The below command has been run:
python3 -m venv $HOME/tmp/deepspeech-train-venv/
source $HOME/tmp/deepspeech-train-venv/bin/activate

And the below log has been found:
root@a13c4bf52b37:/DeepSpeech# ./DeepSpeech.py --helpfull Traceback (most recent call last): File "./DeepSpeech.py", line 7, in <module> from deepspeech_training import train as ds_train File "/DeepSpeech/training/deepspeech_training/train.py", line 30, in <module> from .evaluate import evaluate File "/DeepSpeech/training/deepspeech_training/evaluate.py", line 26, in <module> check_ctcdecoder_version() File "/DeepSpeech/training/deepspeech_training/util/helpers.py", line 53, in check_ctcdecoder_version rv = semver.compare(ds_version_s, decoder_version_s) File "/usr/local/lib/python3.6/dist-packages/semver.py", line 452, in compare v1, v2 = parse(ver1), parse(ver2) File "/usr/local/lib/python3.6/dist-packages/semver.py", line 74, in parse raise ValueError("%s is not valid SemVer string" % version) ValueError: ../../VERSION is not valid SemVer string

Hi, I applied the steps given in the following link to sort the issue.
The problem was with google colab, as is mentioned in the post.

Yup, it seem to be the same problem.

Is there a proper solution to

ValueError: …/…/VERSION is not valid SemVer string

or just make sure we use path with no spaces.

I just make a symbolic link to solve it temporarily.