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

Error in Dockerfile #2324

Closed
pengbin2015 opened this issue Apr 3, 2023 · 2 comments · Fixed by #2382
Closed

Error in Dockerfile #2324

pengbin2015 opened this issue Apr 3, 2023 · 2 comments · Fixed by #2382

Comments

@pengbin2015
Copy link

When building the docker image by using the command "docker build -t langchain .", it will generate the error:

docker build -t langchain .
[+] Building 2.7s (8/12)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.20kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for docker.io/library/python:3.11.2-bullseye 2.3s
=> [internal] load build context 0.1s
=> => transferring context: 192.13kB 0.1s
=> [builder 1/5] FROM docker.io/library/python:3.11.2-bullseye@sha256:21ce92a075cf9c454a936f925e058b4d8fc0cfc7a05b9e877bed4687c51a565 0.0s
=> CACHED [builder 2/5] RUN echo "Python version:" && python --version && echo "" 0.0s
=> CACHED [builder 3/5] RUN echo "Installing Poetry..." && curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/maste 0.0s
=> ERROR [builder 4/5] RUN echo "Poetry version:" && poetry --version && echo "" 0.3s

[builder 4/5] RUN echo "Poetry version:" && poetry --version && echo "":
#7 0.253 Poetry version:
#7 0.253 /bin/sh: 1: poetry: not found


executor failed running [/bin/sh -c echo "Poetry version:" && poetry --version && echo ""]: exit code: 127

The reason why the poetry script is not working is that it does not have the execute permission. Therefore, the solution is to add the command chmod +x /root/.local/bin/poetry after installing Poetry. This command will grant execute permission to the poetry script, ensuring that it can be executed successfully.

@sergerdn
Copy link
Contributor

sergerdn commented Apr 3, 2023

Hmm... I'll take a look at this. I am an author of Dockerfile.
I believe that you might have encountered an error because the environment variables were not set correctly.
May I ask about your environment, such as the versions of your operating system and Docker?

@sergerdn
Copy link
Contributor

sergerdn commented Apr 3, 2023

Note for me:
To ensure that everything is going as expected, it is important to fix the other issue first.

#2334

hwchase17 pushed a commit that referenced this issue Apr 4, 2023
Update the Dockerfile to use the `$POETRY_HOME` argument to set the
Poetry home directory instead of adding Poetry to the PATH environment
variable.

Add instructions to the `CONTRIBUTING.md` file on how to run tests with
Docker.

Closes #2324
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