-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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 is broken #1136
Comments
command 'cmake' failed: No such file or directory |
Hi @t6tv8e - I think the issue is related to the fact that cmake utility is not installed or not available in the system's PATH where you are trying to install the pyarrow package. You might want to check their docs. Or, depending on your OS, install it along these lines (this should work for Ubuntu or Debian-based stuff: sudo apt-get update
sudo apt-get install cmake |
I'm on macos and I have cmake on my machine |
@t6tv8e, can you try running this command in your Terminal and share the output/screenshot here: cmake --version |
Let's check if it's configured properly. mkdir ~/cmake-test
cd ~/cmake-test
echo "cmake_minimum_required(VERSION 3.10)" > CMakeLists.txt
echo "project(HelloCMake)" >> CMakeLists.txt
cmake .
This should check if it is functioning correctly by creating a temporary project directory and attempting to configure a simple project. If that fails, you might want to consider reinstalling it using homebrew or whatever you usually use like this: brew install cmake |
Hm... what's the output of your PATH? echo $PATH
|
That is: |
Hm... can you do this please: which cmake
|
|
Okay, I'll need to check this later today with the team. I'm unsure what the issue might be. Maybe you can try reinstalling the cmake and see if that makes any difference. |
Okay, thanks for your time already in any case |
Of course, we are always trying to help! |
The issue is with cmake missing in the container, not the host system. Seems the Dockerfile needs:
|
Yeah, I've been tinkering with the Dockerfile.
|
Didn't work |
Identical error? |
Yes it's the same error... |
Hey @t6tv8e, we just had our technical planning meeting and discussed this. One of our colleagues tried adding cmake to a Docker image, but that didn't solve the problem. We have a couple of other options we'll try out, but we'll keep you updated! @ErikBjare, thanks for helping with this; I'm super thankful for checking on this, especially while you are away! 🙏 |
Hey. So as I said in the meeting I tried to build the container. Adding I think the I ran the previous version of docker file which builds properly. @t6tv8e can you try this as a docker file instead:
And let us know if this fixes the issue. If it does @viborc I propose we revert to this. Sure the docker image will be a bit bigger, but since we are dealing with LLM's few MB's is nothing 😅 |
That sounds good. Let's see what @t6tv8e says, and we can then figure out the next steps. Thanks for a quick turnaround, @zigabrencic! 💪 |
Perfect! We are now looking into testing this on Linux, Mac, and Windows and we'll see how to fix it for everyone. I'll leave this issue open for now just as a reminder to @zigabrencic and me to follow-up on this for other platforms. Glad it worked for you @t6tv8e! Thanks, @zigabrencic and @ErikBjare for helping out! |
@zigabrencic The I notice that the Dockerfile in #1144 will be reverted; use this one instead: # Stage 1: Builder stage
FROM python:3.11-slim AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
tk \
tcl \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
RUN pip install --no-cache-dir -e .
# Stage 2: Final stage
FROM python:3.11-slim
WORKDIR /app
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /app .
COPY docker/entrypoint.sh .
ENTRYPOINT ["bash", "/app/entrypoint.sh"] The image size would still be reduced And on the other hand, Docker containers are designed to run with an unprivileged user by default, and running commands with |
Hey Thank you for your suggestions. Yes you are correct @k1lgor the cmake dependency broke this. I misstated this before. Tried your proposal and:
As a result I propose we keep the simpler version as implemented here. The cross platform size benefit in my opinion isn't large enough to add the proposed complexity. I made some updates to #1144:
If there are no objections I'll open the PR again. |
Hey @zigabrencic , I believe I may be able to locate the issue. COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
+ COPY --from=builder /usr/bin /usr/bin
COPY --from=builder /app . And in addition, I have added |
Hey @k1lgor Sure I can test it just please let me know which branch? Or if you can provide the full docker file so I test the right thing :) |
Here are the files. In the Dockerifle
pyproject.toml[tool.poetry]
name = "gpt-engineer"
version = "0.3.0"
description = "Specify what you want it to build, the AI asks for clarification, and then builds it."
authors = ["Anton Osika <[email protected]>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/gpt-engineer-org/gpt-engineer"
repository = "https://github.com/gpt-engineer-org/gpt-engineer"
documentation = "https://gpt-engineer.readthedocs.io/en/latest/"
classifiers = [
"Development Status :: 4 - Beta",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
openai = "^1.0"
termcolor = "2.3.0"
typer = ">=0.3.2"
rudder-sdk-python = ">=2.0.2"
dataclasses-json = "0.5.7"
tiktoken = ">=0.0.4"
tabulate = "0.9.0"
python-dotenv = ">=0.21.0"
langchain = ">=0.1.2"
langchain_openai = "*"
toml = ">=0.10.2"
tomlkit = "^0.12.4"
pyperclip = "^1.8.2"
langchain-anthropic = "^0.1.1"
regex = "^2023.12.25"
pillow = "^10.2.0"
datasets = "^2.17.1"
black = "23.3.0"
langchain-community ="0.2.0"
[tool.poetry.group.dev.dependencies]
pytest = ">=7.3.1"
pytest-cov = "^4.1.0"
mypy = "1.3.0"
ruff = ">=0.0.272"
pre-commit = "3.3.3"
tox = ">=3.0.0"
[tool.poetry.group.docs.dependencies]
autodoc_pydantic = ">=1.8.0"
myst_parser = ">=0.18.1"
nbsphinx = ">=0.8.9"
sphinx = ">=5.0.0"
sphinx-autobuild = ">=2021.3.14"
sphinx_book_theme = ">=0.3.3"
sphinx_rtd_theme = ">=1.0.0"
sphinx-typlog-theme = ">=0.8.0"
toml = ">=0.10.2"
myst-nb = ">=0.17.1"
linkchecker = ">=10.2.1"
sphinx-copybutton = ">=0.5.1"
markdown-include = ">=0.6.0"
sphinx_copybutton = ">=0.5.2"
[tool.poetry.scripts]
gpt-engineer = 'gpt_engineer.applications.cli.main:app'
ge = 'gpt_engineer.applications.cli.main:app'
gpte = 'gpt_engineer.applications.cli.main:app'
bench = 'gpt_engineer.benchmark.__main__:app'
gpte_test_application = 'tests.caching_main:app'
[tool.poetry.extras]
test = ["pytest", "pytest-cov"]
doc = ["autodoc_pydantic", "myst_parser", "nbsphinx", "sphinx", "sphinx-autobuild", "sphinx_book_theme", "sphinx_rtd_theme", "sphinx-typlog-theme", "myst-nb", "linkchecker", "sphinx-copybutton", "markdown-include", "sphinx_copybutton"]
[tool.ruff]
select = ["F", "E", "W", "I001"]
show-fixes = false
target-version = "py310"
task-tags = ["TODO", "FIXME"]
extend-ignore = ["E501", "E722"]
[tool.black]
target-version = ["py310"]
[tool.ruff.isort]
known-first-party = []
known-third-party = []
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
combine-as-imports = true
split-on-trailing-comma = false
lines-between-types = 1
[tool.pytest.ini_options]
markers = [
"requires_key: marks tests as requiring access to a valid OPENAI_API_KEY (deselect with '-m \"not requires_key\"')",
] |
Expected Behavior
After running
docker build --rm -t gpt-engineer -f docker/Dockerfile .
I should have a runnable container.Current Behavior
Unable to build the container due to PyArrow and CMake issues.
Failure Information
Failure Logs
The text was updated successfully, but these errors were encountered: