langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Visual Studio Code/Github Codespaces Dev Containers

Open jj701 opened this issue 1 year ago • 2 comments

Having dev containers makes its easier, faster and secure to setup the dev environment for the repository.

The pull request consists of:

  • .devcontainer folder with:
    • devcontainer.json : (minimal necessary vscode extensions and settings)
    • docker-compose.yaml : (could be modified to run necessary services as per need. Ex vectordbs, databases)
    • Dockerfile:(non root with dev tools)
  • Changes to README
    • added the Open in Github Codespaces Badge
    • added the Open in dev container Badge

jj701 avatar May 03 '23 10:05 jj701

image

jj701 avatar May 03 '23 19:05 jj701

I have added vscode default Python Interpreter settings and docker compose network.

Tested the Docker Compose using MongoDB Instance.

jj701 avatar May 04 '23 15:05 jj701

I just gave this a go and it errored out

 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (windows/amd64) and no specific platform was requested
 ---> Running in 0f969f5d18d9
The command '/bin/sh -c echo "@old https://dl-cdn.alpinelinux.org/alpine/v3.15/main" >> /etc/apk/repositories' returned a non-zero code: 4294967295: failed to shutdown container: container 0f969f5d18d962d06b3974f6bba96c52b8acaf83b008a593fb6b727ca724da93 encountered an error during hcsshim::System::wait
Background: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 0f969f5d18d962d06b3974f6bba96c52b8acaf83b008a593fb6b727ca724da93 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)

[2778 ms] Command failed: docker build -f C:\Users\<redacted>\AppData\Local\Temp\vsch\bootstrap-image\0.292.0\bootstrap.Dockerfile -t vsc-volume-bootstrap C:\Users\bberry\AppData\Local\Temp\vsch\bootstrap-image\0.292.0

[2778 ms] Exit code 4294967295```

And I just noticed this looks like it may be because I tried it on windows and that's not supported?

ooo27 avatar May 04 '23 18:05 ooo27

@ooo27 https://github.com/microsoft/hcsshim/issues/813

Solution is to use Docker with WSL2 i think. https://github.com/microsoft/hcsshim/issues/813#issuecomment-711137614

jj701 avatar May 04 '23 21:05 jj701