-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fail to build image from Dockerfile #83
Comments
Most likely fixed in #80 |
I'm waiting for the merge. It did not work from your better-docker branch a1e3108.
|
EDIT: I think I know the issue: if you're using the Dockerfile from the MR that's not yet merged, you also need to change the pulling url from
to
|
Docker version 23.0.5, build bc4487a The su77ungr/casalioy:stable image worked fine. I made the change, yarl still seems to be a bottleneck :
I'll try tomorrow again. |
On my computers the yarl install always takes a very long time (tens of seconds), but eventually succeeds. This really sounds like a network issue on the yarn install. Edit: actually, it looks like you get a new error with the changes in the dockerfile ! Looks like an issue with the poetry cache. |
@mlynar-czyk Can you rerun the latest version with |
Nope. The [+] Building 142.7s (13/18)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.60kB 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 65B 0.0s
=> [internal] load metadata for docker.io/library/python:3.11-slim 0.9s
=> [internal] load build context 0.0s
=> => transferring context: 33B 0.0s
=> CACHED [python-base 1/1] FROM docker.io/library/python:3.11-slim@sha256:551c9529e77896518ac5693d7e98ee5e12051d625de450ac2a68da1eae15ec87 0.0s
=> [builder-base 1/10] RUN apt-get update && apt-get install -y build-essential git 41.1s
=> [builder-base 2/10] RUN pip install "poetry==1.4.2" 19.2s
=> [builder-base 3/10] WORKDIR /srv 0.1s
=> [builder-base 4/10] RUN git clone https://github.com/hippalectryon-0/CASALIOY.git 1.7s
=> [builder-base 5/10] WORKDIR CASALIOY 0.1s
=> [builder-base 6/10] RUN git checkout better-docker 0.5s
=> [builder-base 7/10] RUN pip install --upgrade setuptools virtualenv 5.4s
=> ERROR [builder-base 8/10] RUN poetry install --with GUI,LLM --without dev --sync 73.6s
------
> [builder-base 8/10] RUN poetry install --with GUI,LLM --without dev --sync:
#12 1.190 Creating virtualenv casalioy in /srv/CASALIOY/.venv
#12 2.353 Installing dependencies from lock file
#12 5.955
#12 5.955 Package operations: 169 installs, 0 updates, 0 removals
#12 5.956
#12 5.958 • Installing pycparser (2.21)
#12 5.959 • Installing six (1.16.0)
#12 6.417 • Installing attrs (23.1.0)
#12 6.418 • Installing cffi (1.15.1)
#12 6.418 • Installing idna (3.4)
#12 6.422 • Installing markupsafe (2.1.2)
#12 6.426 • Installing numpy (1.23.5)
#12 6.430 • Installing pyrsistent (0.19.3)
#12 6.434 • Installing python-dateutil (2.8.2)
#12 6.444 • Installing pytz (2023.3)
#12 6.454 • Installing smmap (5.0.0)
#12 6.459 • Installing sniffio (1.3.0)
#12 6.470 • Installing tzdata (2023.3)
#12 6.793 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
#12 12.52 • Installing anyio (3.6.2)
#12 12.52 • Installing certifi (2023.5.7)
#12 12.52 • Installing charset-normalizer (3.1.0)
#12 12.53 • Installing commonmark (0.9.1)
#12 12.53 • Installing cryptography (40.0.2)
#12 12.54 • Installing decorator (5.1.1)
#12 12.54 • Installing entrypoints (0.4)
#12 12.54 • Installing gitdb (4.0.10)
#12 12.55 • Installing h11 (0.14.0)
#12 12.56 • Installing jinja2 (3.1.2)
#12 12.57 • Installing jsonschema (4.17.3)
#12 12.57 • Installing mpmath (1.3.0)
#12 12.80 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
#12 12.81 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
#12 13.11 • Installing olefile (0.46)
#12 13.15 • Installing packaging (23.1)
#12 13.48 • Installing pandas (1.5.3)
#12 13.72 • Installing pygments (2.15.1)
#12 13.76 • Installing pytz-deprecation-shim (0.1.0.post0)
#12 13.84 • Installing soupsieve (2.4.1)
#12 14.00 • Installing toolz (0.12.0)
#12 14.01 • Installing urllib3 (1.26.15)
#12 14.07 • Installing zipp (3.15.0)
#12 20.39 • Installing altair (4.2.2)
#12 20.39 • Installing beautifulsoup4 (4.12.2)
#12 20.39 • Installing blinker (1.6.2)
#12 20.39 • Installing cachetools (5.3.0)
#12 20.39 • Installing click (8.1.3)
#12 20.39 • Installing colorclass (2.2.2)
#12 20.40 • Installing contourpy (1.0.7)
#12 20.40 • Installing cycler (0.11.0)
#12 20.40 • Installing easygui (0.98.3)
#12 20.41 • Installing filelock (3.12.0)
#12 20.41 • Installing fonttools (4.39.4)
#12 20.41 • Installing frozenlist (1.3.3)
#12 20.64 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
#12 20.64 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
#12 21.01 • Installing fsspec (2023.5.0)
#12 21.06 • Installing gitpython (3.1.31)
#12 21.16 • Installing hpack (4.0.0)
#12 21.28 • Installing httpcore (0.16.3)
#12 21.35 • Installing hyperframe (6.0.1)
#12 21.50 • Installing importlib-metadata (6.6.0)
#12 21.57 • Installing kiwisolver (1.4.4)
#12 21.79 • Installing markdown (3.4.3)
#12 21.98 • Installing marshmallow (3.19.0)
#12 22.10 • Installing more-itertools (9.1.0)
#12 22.15 • Installing msoffcrypto-tool (5.0.1)
#12 22.36 • Installing multidict (6.0.4)
#12 22.43 • Installing mypy-extensions (1.0.0)
#12 22.85 • Installing networkx (3.1)
#12 22.94 • Installing pcodedmp (1.2.6)
#12 22.98 • Installing pillow (9.5.0)
#12 23.00 • Installing protobuf (4.23.0)
#12 23.03 • Installing pyarrow (12.0.0)
#12 23.18 • Installing pydeck (0.8.0)
#12 23.26 • Installing pympler (1.0.1)
#12 23.38 • Installing pyparsing (2.4.7)
#12 23.43 • Installing pyyaml (6.0)
#12 23.75 • Installing requests (2.30.0)
#12 24.11 • Installing rfc3986 (1.5.0)
#12 24.72 • Installing rich (13.0.1)
#12 24.91 • Installing sympy (1.12)
#12 24.98 • Installing tenacity (8.2.2)
#12 25.13 • Installing toml (0.10.2)
#12 25.41 • Installing tornado (6.3.2)
#12 25.79 • Installing tqdm (4.65.0)
#12 25.90 • Installing typing-extensions (4.5.0)
#12 25.96 • Installing tzlocal (4.2)
#12 26.50 • Installing validators (0.20.0)
#12 26.68 • Installing watchdog (3.0.0)
#12 27.22 • Installing wrapt (1.14.1)
#12 40.97 • Installing aiosignal (1.3.1)
#12 40.97 • Installing async-timeout (4.0.2)
#12 40.97 • Installing backoff (2.2.1)
#12 40.97 • Installing deprecated (1.2.13)
#12 40.98 • Installing et-xmlfile (1.1.0)
#12 40.98 • Installing faker (18.9.0)
#12 40.98 • Installing favicon (0.7.0)
#12 40.98 • Installing greenlet (2.0.2)
#12 40.99 • Installing grpcio (1.54.2)
#12 40.99 • Installing h2 (4.1.0)
#12 40.99 • Installing htbuilder (0.6.1)
#12 41.00 • Installing httpx (0.23.3)
#12 41.23 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
#12 41.24 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
#12 41.75 • Installing huggingface-hub (0.14.1)
#12 41.77 • Installing joblib (1.2.0)
#12 41.78 • Installing lark-parser (0.12.0)
#12 41.80 • Installing lxml (4.9.2)
#12 41.85 • Installing marshmallow-enum (1.5.1)
#12 42.00 • Installing matplotlib (3.7.1)
#12 42.19 • Installing monotonic (1.6)
#12 42.53 • Installing oletools (0.60.1)
#12 42.71 • Installing pydantic (1.10.7)
#12 43.09 • Installing pymdown-extensions (10.0.1)
#12 43.83 • Installing regex (2023.5.5)
#12 44.48 • Installing requests-file (1.5.1)
#12 44.76 • Installing scipy (1.10.1)
#12 45.16 • Installing streamlit (1.22.0 0b7fb1c)
#12 45.31 • Installing threadpoolctl (3.1.0)
#12 45.89 • Installing tokenizers (0.13.3)
#12 46.14 • Installing torch (2.0.1)
#12 46.14 • Installing typer (0.7.0)
#12 47.06 • Installing typing-inspect (0.8.0)
#12 47.27 • Installing xlsxwriter (3.1.0)
#12 47.89 • Installing yarl (1.9.2)
#12 56.45
#12 56.45 ValueError
#12 56.45
#12 56.45 invalid literal for int() with base 16: b''
#12 56.45
#12 56.45 at /usr/local/lib/python3.11/http/client.py:533 in _read_next_chunk_size
#12 56.58 529│ i = line.find(b";")
#12 56.58 530│ if i >= 0:
#12 56.59 531│ line = line[:i] # strip chunk-extensions
#12 56.59 532│ try:
#12 56.59 → 533│ return int(line, 16)
#12 56.59 534│ except ValueError:
#12 56.59 535│ # close the connection as protocol synchronisation is
#12 56.59 536│ # probably lost
#12 56.59 537│ self._close_conn()
#12 56.59
#12 56.59 The following error occurred when trying to handle this error:
#12 56.59
#12 56.60
#12 56.60 IncompleteRead
#12 56.60
#12 56.60 IncompleteRead(0 bytes read)
#12 56.60
#12 56.60 at /usr/local/lib/python3.11/http/client.py:568 in _get_chunk_left
#12 56.75 564│ self._safe_read(2) # toss the CRLF at the end of the chunk
#12 56.75 565│ try:
#12 56.75 566│ chunk_left = self._read_next_chunk_size()
#12 56.75 567│ except ValueError:
#12 56.75 → 568│ raise IncompleteRead(b'')
#12 56.75 569│ if chunk_left == 0:
#12 56.76 570│ # last chunk: 1*("0") [ chunk-extension ] CRLF
#12 56.76 571│ self._read_and_discard_trailer()
#12 56.76 572│ # we read everything; close the "file"
#12 56.76
#12 56.76 The following error occurred when trying to handle this error:
#12 56.76
#12 56.76
#12 56.76 IncompleteRead
#12 56.76
#12 56.76 IncompleteRead(3828 bytes read)
#12 56.76
#12 56.76 at /usr/local/lib/python3.11/http/client.py:598 in _read_chunked
#12 56.90 594│ amt -= chunk_left
#12 56.90 595│ self.chunk_left = 0
#12 56.90 596│ return b''.join(value)
#12 56.90 597│ except IncompleteRead as exc:
#12 56.91 → 598│ raise IncompleteRead(b''.join(value)) from exc
#12 56.91 599│
#12 56.91 600│ def _readinto_chunked(self, b):
#12 56.91 601│ assert self.chunked != _UNKNOWN
#12 56.91 602│ total_bytes = 0
#12 56.91
#12 56.91 The following error occurred when trying to handle this error:
#12 56.91
#12 56.91
#12 56.91 ProtocolError
#12 56.91
#12 56.91 ('Connection broken: IncompleteRead(3828 bytes read)', IncompleteRead(3828 bytes read))
#12 56.92
#12 56.92 at /usr/local/lib/python3.11/site-packages/urllib3/response.py:461 in _error_catcher
#12 56.99 457│ raise ReadTimeoutError(self._pool, None, "Read timed out.")
#12 56.99 458│
#12 57.00 459│ except (HTTPException, SocketError) as e:
#12 57.00 460│ # This includes IncompleteRead.
#12 57.00 → 461│ raise ProtocolError("Connection broken: %r" % e, e)
#12 57.00 462│
#12 57.00 463│ # If no exception is thrown, we should avoid cleaning up
#12 57.00 464│ # unnecessarily.
#12 57.00 465│ clean_exit = True
#12 57.00
#12 69.75
#12 69.75 RuntimeError
#12 69.75
#12 69.75 Hash for torch (2.0.1) from archive torch-2.0.1-cp311-cp311-manylinux1_x86_64.whl not found in known hashes (was: sha256:062b765540ea9c6863b9f5174bfce7974b952aff9b93d13ad00f741c8975a479)
#12 69.75
#12 69.75 at /usr/local/lib/python3.11/site-packages/poetry/installation/executor.py:769 in _validate_archive_hash
#12 69.84 765│ archive_hash: str = "sha256:" + get_file_hash(archive)
#12 69.84 766│ known_hashes = {f["hash"] for f in package.files if f["file"] == archive.name}
#12 69.84 767│
#12 69.84 768│ if archive_hash not in known_hashes:
#12 69.84 → 769│ raise RuntimeError(
#12 69.84 770│ f"Hash for {package} from archive {archive.name} not found in"
#12 69.84 771│ f" known hashes (was: {archive_hash})"
#12 69.84 772│ )
#12 69.84 773│
#12 69.84
------
Dockerfile:29
--------------------
27 | RUN git checkout better-docker
28 | RUN pip install --upgrade setuptools virtualenv
29 | >>> RUN poetry install --with GUI,LLM --without dev --sync
30 | RUN . .venv/bin/activate && pip install --force torch torchvision --index-url https://download.pytorch.org/whl/cpu # CPU-only torch for sentence_transformers
31 | RUN . .venv/bin/activate && pip install --force streamlit # Temp fix, see pyproject.toml
--------------------
error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c poetry install --with GUI,LLM --without dev --sync" did not complete successfully: exit code: 1 |
Sorry for the inconvenience. Edit: windows 10 testing now I'm spinning up some VMs in azure now.
|
Don't be sorry. Hope to still be able to use it on a Windows workstation. I would like to commit a full working container to export it on a offline computer. (I did a system reboot too, just in case...) |
Sure, we are planning to offer a package that works plug-in-play with every python ready machine too. Let's fix this first, run tests and I'll hit you up as soon as possible @hippalectryon-0 sure python:3.11-slim is compatible? see #84 on bottom |
slim is just a version without additional packages. If you need to add anything, just apt install it in the dockerfile. Moreover, the dockerfile produces a perfectly working image on my end, so clearly it can work. I'm working on another feature rn, but I'll try to pull your latest image to see what happens. |
.env
Python version
python 3.11
System
Windows 10
CASALIOY version
e72bcd5
Information
Related Components
Reproduction
When trying to build the image from the Dockerfile, the poetry install seems not to behave as intended.
Expected behavior
A docker image should be build from the command :
The text was updated successfully, but these errors were encountered: