-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dev container support for project (#704)
* Configure dev container for project * Ignore personalization script * enh(devcontainer): add pre-commit hooks * enh(devcontainer): smaller image * docs(devcontainer): Add instructions about how to use devcontainers * enh(devcontainer): Configure pytest testing panel * docs(devcontainer): Explain commit message regex enforcement * enh(devcontainer): Add git lens extension * enh(devcontainer): Fixes * revert(devcontainer): Remove postgres CLI by default * enh(devcontainer): Add tmux CLI tool * fix(devcontainer): Exit if any commands in post create fail * fix(devcontainer): Recompile lock file * enh(devcontainer): Auto fetch from git * fix(dependencies): Re-add pre-commit dep * fix(devcontainers): Prevent failure when installing reqs with high num CPUs * maint(python-version): Update github CI to 3.11 * ci(upgrade-poetry): Upgrade version in CI to reflect lock file version * maint(devcontainer): Remove misspelled extension * maint(devcontainer): Downgrade dev env for 3.9 * ci(devcontainer): Revert GH workflows back to 3.9
- Loading branch information
1 parent
c9b2394
commit fb52b19
Showing
7 changed files
with
190 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode-remote.vscode-remote-extensionpack", | ||
"charliermarsh.ruff", | ||
"ms-azuretools.vscode-docker", | ||
"ms-toolsai.jupyter", | ||
"ms-python.mypy-type-checker", | ||
"ms-vsliveshare.vsliveshare", | ||
"ms-python.python", | ||
"eamodio.gitlens", | ||
"github.vscode-pull-request-github" | ||
], | ||
"settings": { | ||
"git.autofetch": true, | ||
"python.testing.pytestEnabled": true, | ||
"terminal.integrated.defaultProfile.linux": "zsh" | ||
} | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers-contrib/features/tmux-apt-get:1": {}, | ||
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": { | ||
"omzPlugins": "https://github.com/zsh-users/zsh-syntax-highlighting.git https://github.com/zsh-users/zsh-autosuggestions.git", | ||
"plugins": "zsh-syntax-highlighting zsh-autosuggestions" | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": {}, | ||
"ghcr.io/devcontainers/features/github-cli:1": {}, | ||
"ghcr.io/schlich/devcontainer-features/powerlevel10k:1": {} | ||
}, | ||
"image": "mcr.microsoft.com/devcontainers/python:3.9", | ||
"name": "Python 3", | ||
"postCreateCommand": "chmod +x ./.devcontainer/post_create.sh && ./.devcontainer/post_create.sh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
set -e # Exit immediately if a command exits with a non-zero status. | ||
|
||
git config --global --add safe.directory /workspaces/dspy | ||
|
||
pip install poetry==1.7.1 | ||
poetry config installer.max-workers 4 | ||
|
||
poetry install --with dev | ||
|
||
sudo apt update | ||
sudo apt-get -y install python3-distutils | ||
|
||
poetry run pre-commit install --install-hooks | ||
|
||
personalization_script="./.devcontainer/.personalization.sh" | ||
|
||
# Developers can place a personalization script in the location specified above | ||
# to further customize their dev container | ||
if [ -f "$personalization_script" ]; then | ||
echo "File $personalization_script exists. Running the script..." | ||
chmod +x "$personalization_script" | ||
$personalization_script | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,4 @@ finetuning_ckpts/ | |
assertion.log | ||
*.log | ||
*.db | ||
/.devcontainer/.personalization.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters