AutoGPT: Docker build fails due to sorcery dependency

Duplicates

  • I have searched the existing issues

Steps to reproduce πŸ•Ή

$ docker build -t autogpt .

Current behavior 😯

[+] Building 5.2s (10/11)
 => [internal] load build definition from Dockerfile                                                           0.0s
 => => transferring dockerfile: 688B                                                                           0.0s
 => [internal] load .dockerignore                                                                              0.0s
 => => transferring context: 2B                                                                                0.0s
 => [internal] load metadata for docker.io/library/python:3.11-slim                                            1.2s
 => [1/7] FROM docker.io/library/python:3.11-slim@sha256:286f2f1d6f2f730a44108656afb04b131504b610a6cb2f341391  0.0s
 => [internal] load build context                                                                              0.0s
 => => transferring context: 1.55kB                                                                            0.0s
 => CACHED [2/7] RUN useradd --create-home appuser                                                             0.0s
 => CACHED [3/7] WORKDIR /home/appuser                                                                         0.0s
 => CACHED [4/7] RUN chown appuser:appuser /home/appuser                                                       0.0s
 => CACHED [5/7] COPY --chown=appuser:appuser requirements.txt .                                               0.0s
 => ERROR [6/7] RUN pip install --no-cache-dir --user -r requirements.txt                                      3.9s
------
 > [6/7] RUN pip install --no-cache-dir --user -r requirements.txt:
#10 0.978 Collecting beautifulsoup4
#10 1.095   Downloading beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)
#10 1.109      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.0/143.0 kB 11.2 MB/s eta 0:00:00
#10 1.133 Collecting colorama==0.4.6
#10 1.142   Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
#10 1.163 Collecting openai==0.27.2
#10 1.173   Downloading openai-0.27.2-py3-none-any.whl (70 kB)
#10 1.177      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.1/70.1 kB 259.8 MB/s eta 0:00:00
#10 1.194 Collecting playsound==1.2.2
#10 1.204   Downloading playsound-1.2.2-py2.py3-none-any.whl (6.0 kB)
#10 1.224 Collecting python-dotenv==1.0.0
#10 1.237   Downloading python_dotenv-1.0.0-py3-none-any.whl (19 kB)
#10 1.275 Collecting pyyaml==6.0
#10 1.286   Downloading PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (732 kB)
#10 1.314      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 732.4/732.4 kB 28.3 MB/s eta 0:00:00
#10 1.328 Collecting readability-lxml==0.8.1
#10 1.336   Downloading readability_lxml-0.8.1-py3-none-any.whl (20 kB)
#10 1.365 Collecting requests
#10 1.373   Downloading requests-2.28.2-py3-none-any.whl (62 kB)
#10 1.377      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 36.8 MB/s eta 0:00:00
#10 1.398 Collecting tiktoken==0.3.3
#10 1.409   Downloading tiktoken-0.3.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB)
#10 1.457      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 35.8 MB/s eta 0:00:00
#10 1.473 Collecting gTTS==2.3.1
#10 1.481   Downloading gTTS-2.3.1-py3-none-any.whl (28 kB)
#10 1.506 Collecting docker
#10 1.515   Downloading docker-6.0.1-py3-none-any.whl (147 kB)
#10 1.522      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 147.5/147.5 kB 31.0 MB/s eta 0:00:00
#10 1.539 Collecting duckduckgo-search
#10 1.547   Downloading duckduckgo_search-2.8.5-py3-none-any.whl (30 kB)
#10 1.587 Collecting google-api-python-client
#10 1.597   Downloading google_api_python_client-2.85.0-py2.py3-none-any.whl (11.2 MB)
#10 1.914      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.2/11.2 MB 36.2 MB/s eta 0:00:00
#10 1.959 Collecting pinecone-client==2.2.1
#10 1.968   Downloading pinecone_client-2.2.1-py3-none-any.whl (177 kB)
#10 1.974      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 177.2/177.2 kB 42.4 MB/s eta 0:00:00
#10 2.002 Collecting redis
#10 2.013   Downloading redis-4.5.4-py3-none-any.whl (238 kB)
#10 2.020      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 238.9/238.9 kB 40.3 MB/s eta 0:00:00
#10 2.141 Collecting orjson
#10 2.149   Downloading orjson-3.8.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (261 kB)
#10 2.158      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 261.1/261.1 kB 36.1 MB/s eta 0:00:00
#10 2.284 Collecting Pillow
#10 2.295   Downloading Pillow-9.5.0-cp311-cp311-manylinux_2_28_aarch64.whl (3.2 MB)
#10 2.382      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 37.0 MB/s eta 0:00:00
#10 2.413 Collecting selenium
#10 2.423   Downloading selenium-4.8.3-py3-none-any.whl (6.5 MB)
#10 2.602      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 37.0 MB/s eta 0:00:00
#10 2.626 Collecting webdriver-manager
#10 2.634   Downloading webdriver_manager-3.8.6-py2.py3-none-any.whl (27 kB)
#10 2.816 Collecting coverage
#10 2.830   Downloading coverage-7.2.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (232 kB)
#10 2.832      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.4/232.4 kB 140.7 MB/s eta 0:00:00
#10 2.856 Collecting flake8
#10 2.864   Downloading flake8-6.0.0-py2.py3-none-any.whl (57 kB)
#10 2.868      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.8/57.8 kB 45.6 MB/s eta 0:00:00
#10 2.982 Collecting numpy
#10 2.997   Downloading numpy-1.24.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.0 MB)
#10 3.551      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 23.1 MB/s eta 0:00:00
#10 3.611 Collecting pre-commit
#10 3.621   Downloading pre_commit-3.2.2-py2.py3-none-any.whl (202 kB)
#10 3.636      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 202.7/202.7 kB 14.6 MB/s eta 0:00:00
#10 3.664 Collecting black
#10 3.673   Downloading black-23.3.0-py3-none-any.whl (180 kB)
#10 3.691      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.0/181.0 kB 11.2 MB/s eta 0:00:00
#10 3.707 ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
#10 3.707 ERROR: Could not find a version that satisfies the requirement sourcery (from versions: none)
#10 3.707 ERROR: No matching distribution found for sourcery
#10 3.763
#10 3.763 [notice] A new release of pip available: 22.3.1 -> 23.0.1
#10 3.763 [notice] To update, run: pip install --upgrade pip
------
executor failed running [/bin/sh -c pip install --no-cache-dir --user -r requirements.txt]: exit code: 1

Expected behavior πŸ€”

Docker build does not fail

Your prompt πŸ“

N/A

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (2 by maintainers)

Commits related to this issue

Most upvoted comments

The root cause here is that recently sourcery has been added as a dependency, which only supports 64bit python:

… Currently, we only support 64-bit.

Are you using a 32-bit machine? If not, could you please try installing Python 64-bit and checking if pip install sourcery-cli works?

_Originally posted by @ruancomelli in https://github.com/sourcery-ai/sourcery/issues/257#issuecomment-1194539132_

Changing the base image in Dockerfile fixed the issue for me:

FROM amd64/python:3.11-slim

Not perfect and could be heavily revised but hoping I can hand this off to someone much smarter hah.

Man, I went to update my repo today based on the recent changes to Auto-GPT. It’s not even been a week and all my work is outdated! lol This project is moving way too fast for me to keep up.

Edit: If anyone wants to take over my project at https://github.com/claytondukes/autogpt-docker please reach out. I wish I had more time, but have to work my day job and maintain family time.

Having same issues also after switching to python3 -m option, removed sourcery requirement for now

It’s also breaking my docker compose for auto-gpt

#0 81.12 ERROR: Could not find a version that satisfies the requirement sourcery (from versions: none)
#0 81.12 ERROR: No matching distribution found for sourcery
------
Dockerfile:27
--------------------
  26 |
  27 | >>> RUN apk update && apk add --no-cache git vim curl pkgconfig \
  28 | >>> cairo-dev g++ gcc libffi-dev libjpeg-turbo-dev libxml2-dev libxslt-dev \
  29 | >>> gstreamer gst-plugins-base gst-plugins-good \
  30 | >>> girara-dev gobject-introspection-dev sudo wget curl \
  31 | >>> && addgroup -g 1000 -S auto-gpt && adduser -u 1000 -S -G auto-gpt auto-gpt \
  32 | >>> && pip install --upgrade pip \
  33 | >>> && pip install pycairo PyGObject \
  34 | >>> && python3 -m pip install --no-cache-dir --user -r requirements.txt \
  35 | >>> && chown -R 1000:1000 /app
  36 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apk update && apk add --no-cache git vim curl pkgconfig cairo-dev g++ gcc libffi-dev libjpeg-turbo-dev libxml2-dev libxslt-dev gstreamer gst-plugins-base gst-plugins-good girara-dev gobject-introspection-dev sudo wget curl && addgroup -g 1000 -S auto-gpt && adduser -u 1000 -S -G auto-gpt auto-gpt && pip install --upgrade pip && pip install pycairo PyGObject && python3 -m pip install --no-cache-dir --user -r requirements.txt && chown -R 1000:1000 /app" did not complete successfully: exit code: 1

@Qoyyuum still an issue for me with latest master branch.