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

Prebuild a dev container image to improve build time #6547

Closed
bamurtaugh opened this issue Jun 21, 2023 · 3 comments
Closed

Prebuild a dev container image to improve build time #6547

bamurtaugh opened this issue Jun 21, 2023 · 3 comments

Comments

@bamurtaugh
Copy link
Contributor

bamurtaugh commented Jun 21, 2023

Feature request

Thanks so much for merging the PR to update the dev container in this repo #6189!

While the dev container now builds and runs successfully, it can take some time to build. One recommendation is for the LangChain team to pre-build an image.

Motivation

We recommend pre-building images with the tools you need rather than creating and building a container image each time you open your project in a dev container. Using pre-built images will result in a faster container startup, simpler configuration, and allows you to pin to a specific version of tools to improve supply-chain security and avoid potential breaks. You can automate pre-building your image by scheduling the build using a DevOps or continuous integration (CI) service like GitHub Actions.

There's further info in our docs: https://containers.dev/implementors/reference/#prebuilding.

Your contribution

We're more than happy to answer any questions and would love to hear feedback if you're interested in hosting a pre-built image! On the dev container team side, we're also looking to even better document pre-building: devcontainers/spec#261, which should help as a reference for scenarios like this too.

@RadhikaBansal97
Copy link
Contributor

Hi @bamurtaugh,

I have tried to run dev container multiple times both on codespaces and local machine(windows). But It always ends up giving this error.

Also attaching the creation.log file for your reference
creation.log

executor failed running [/bin/sh -c chmod -R 0755 /tmp/dev-container-features/poetry_1 && cd /tmp/dev-container-features/poetry_1 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh]: exit code: 1
ERROR: Service 'langchain' failed to build : Build failed
2023-06-29 14:59:55.198Z: Stop: Run: docker-compose --project-name langchain_devcontainer -f /var/lib/docker/codespacemount/workspace/langchain/.devcontainer/docker-compose.yaml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose.codespaces.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.build-1688050645299.yml build
2023-06-29 14:59:55.202Z: Error: Command failed: docker-compose --project-name langchain_devcontainer -f /var/lib/docker/codespacemount/workspace/langchain/.devcontainer/docker-compose.yaml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose.codespaces.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.build-1688050645299.yml build
2023-06-29 14:59:55.206Z: at Uw (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1969:412)
2023-06-29 14:59:55.207Z: at processTicksAndRejections (internal/process/task_queues.js:95:5)
2023-06-29 14:59:55.209Z: at async hte (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1969:2381)
2023-06-29 14:59:55.248Z: at async fte (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1951:3170)
2023-06-29 14:59:55.249Z: at async Lte (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2021:3833)
2023-06-29 14:59:55.254Z: at async Hf (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2021:4775)
2023-06-29 14:59:55.256Z: at async rne (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2152:10371)
2023-06-29 14:59:55.258Z: at async tne (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2152:10112)
2023-06-29 14:59:55.267Z: {"outcome":"error","message":"Command failed: docker-compose --project-name langchain_devcontainer -f /var/lib/docker/codespacemount/workspace/langchain/.devcontainer/docker-compose.yaml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose.codespaces.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.build-1688050645299.yml build","description":"An error occurred building the Docker Compose images."}
2023-06-29 14:59:55.274Z: devcontainer process exited with exit code 1

@dbline
Copy link

dbline commented Aug 12, 2023

I am having the same issue trying to build docker-compose dev container. it fails every time. I can attach vscode to an already running container, but that is about it.

I can dump logs, but ultimately I am just getting the same error as the user above. I can't find any other logging related to the failure

Copy link

dosubot bot commented Nov 11, 2023

Hi, @bamurtaugh! I'm Dosu, and I'm here to help the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, this issue is a feature request to pre-build a dev container image for faster build times and improved configuration. You mentioned that you are open to feedback and collaboration on hosting a pre-built image. There are also two comments from other users who are experiencing an error when trying to build the dev container using docker-compose. They have provided logs and described the error they are encountering.

Before we proceed, we would like to confirm if this issue is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or the issue will be automatically closed in 7 days.

Thank you for your understanding and cooperation. We appreciate your contribution to the LangChain project!

Best regards,
Dosu

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 11, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 18, 2023
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

No branches or pull requests

3 participants