Update Devcontainer (#781)
Update Devcontainer to install and configure the development environment. - Add "setup_devcontainer" task to the makefile - Add .gitattributes
This commit is contained in:
commit
50112c51d3
4 changed files with 50 additions and 25 deletions
|
|
@ -15,7 +15,8 @@
|
||||||
"actboy168.tasks",
|
"actboy168.tasks",
|
||||||
"GitHub.copilot",
|
"GitHub.copilot",
|
||||||
"ms-python.python",
|
"ms-python.python",
|
||||||
"eamodio.gitlens"
|
"eamodio.gitlens",
|
||||||
|
"GitHub.vscode-pull-request-github"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,37 +3,36 @@
|
||||||
{
|
{
|
||||||
"name": "LangChain Dev Container",
|
"name": "LangChain Dev Container",
|
||||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||||
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
|
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye",
|
||||||
|
|
||||||
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/aws-cli:1": {},
|
"ghcr.io/devcontainers/features/node": {},
|
||||||
"ghcr.io/devcontainers/features/docker-in-docker": {},
|
|
||||||
"ghcr.io/devcontainers-contrib/features/poetry": {}
|
"ghcr.io/devcontainers-contrib/features/poetry": {}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
// "forwardPorts": [],
|
||||||
|
|
||||||
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
|
"postCreateCommand": "make setup_devcontainer",
|
||||||
|
|
||||||
|
"containerEnv": {
|
||||||
|
"POETRY_VIRTUALENVS_IN_PROJECT": "true"
|
||||||
|
},
|
||||||
|
|
||||||
|
// Configure tool-specific properties.
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {"extensions": [
|
"vscode": {"extensions": [
|
||||||
"actboy168.tasks",
|
"actboy168.tasks",
|
||||||
"GitHub.copilot",
|
"GitHub.copilot",
|
||||||
"ms-python.python",
|
"ms-python.python",
|
||||||
"sourcery.sourcery",
|
"sourcery.sourcery",
|
||||||
"eamodio.gitlens"
|
"eamodio.gitlens",
|
||||||
|
"ms-vscode.makefile-tools",
|
||||||
|
"GitHub.vscode-pull-request-github"
|
||||||
]}
|
]}
|
||||||
},
|
}
|
||||||
|
|
||||||
"containerEnv": {
|
|
||||||
"POETRY_VIRTUALENVS_IN_PROJECT": "true"
|
|
||||||
},
|
|
||||||
|
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
|
||||||
// "features": {},
|
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
||||||
// "forwardPorts": [],
|
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
|
||||||
"postCreateCommand": "poetry install"
|
|
||||||
|
|
||||||
// Configure tool-specific properties.
|
|
||||||
// "customizations": {},
|
|
||||||
|
|
||||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||||
// "remoteUser": "root"
|
// "remoteUser": "root"
|
||||||
|
|
|
||||||
20
.gitattributes
vendored
Normal file
20
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||||
|
* text eol=lf
|
||||||
|
|
||||||
|
# Explicitly declare text files you want to always be normalized and converted
|
||||||
|
# to native line endings on checkout.
|
||||||
|
*.c text
|
||||||
|
*.h text
|
||||||
|
*.py text
|
||||||
|
*.js text
|
||||||
|
*.ts text
|
||||||
|
*.jsx text
|
||||||
|
*.md text
|
||||||
|
*.mdx text
|
||||||
|
|
||||||
|
# Declare files that will always have CRLF line endings on checkout.
|
||||||
|
*.sln text eol=crlf
|
||||||
|
|
||||||
|
# Denote all files that are truly binary and should not be modified.
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
5
Makefile
5
Makefile
|
|
@ -40,6 +40,11 @@ install_frontendc:
|
||||||
run_frontend:
|
run_frontend:
|
||||||
cd src/frontend && npm start
|
cd src/frontend && npm start
|
||||||
|
|
||||||
|
setup_devcontainer:
|
||||||
|
make init
|
||||||
|
make build_frontend
|
||||||
|
poetry run langflow --path src/frontend/build
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
make install_frontend
|
make install_frontend
|
||||||
make run_frontend
|
make run_frontend
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue