-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make devcontainer work in codespace (#251)
* WIP * WIP: Enable 'Recommended secrets' in the dev container * WIP: Polishing * WIP * Set default value for container prefix env variable * WIP * WIP * WIP * Add prefix to container names * Make python 3.10 version of dev container as default * Fix env file path * Fix NATS server config path * Fix the workspace path * WIP: Update contributing guide * WIP * WIP * WIP * Update contributing guide * Update contributing guide * Fix test which hangs in codespace * Update contributing guide * Update python 3.9 devcontainer configuration * Update docs * Update docs and configuration files * Update configuration files * Update configuration file * Polishing --------- Co-authored-by: Kumaran Rajendhiran <[email protected]>
- Loading branch information
1 parent
3eb2572
commit ecdcf12
Showing
13 changed files
with
513 additions
and
200 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,97 @@ | ||
{ | ||
"name": "python-3.10", | ||
// "image": "mcr.microsoft.com/devcontainers/python:3.10", | ||
"dockerComposeFile": [ | ||
"./docker-compose.yml" | ||
], | ||
"service": "python-3.10-fastagency", | ||
"forwardPorts": [ | ||
"fastagency-${containerEnv:CONTAINER_PREFIX}-nats-py310:9222" | ||
], | ||
"secrets": { | ||
"OPENAI_API_KEY": { | ||
"description": "This key is optional and only needed if you are working on OpenAI-related code. Leave it blank if not required. You can always set it later as an environment variable in the codespace terminal." | ||
}, | ||
"TOGETHER_API_KEY": { | ||
"description": "This key is optional and only needed if you are working with Together API-related code. Leave it blank if not required. You can always set it later as an environment variable in the codespace terminal." | ||
}, | ||
"ANTHROPIC_API_KEY": { | ||
"description": "This key is optional and only needed if you are working with Anthropic API-related code. Leave it blank if not required. You can always set it later as an environment variable in the codespace terminal." | ||
}, | ||
"AZURE_OPENAI_API_KEY": { | ||
"description": "This key is optional and only needed if you are using Azure's OpenAI services. For it to work, you must also set the related environment variables: AZURE_API_ENDPOINT, AZURE_API_VERSION, and at least one of AZURE_GPT35_MODEL, AZURE_GPT4_MODEL, or AZURE_GPT4o_MODEL. Leave it blank if not required. You can always set these variables later in the codespace terminal." | ||
}, | ||
"AZURE_API_ENDPOINT": { | ||
"description": "This key is required if you are using Azure's OpenAI services. It must be used in conjunction with AZURE_OPENAI_API_KEY, AZURE_API_VERSION, and at least one of AZURE_GPT35_MODEL, AZURE_GPT4_MODEL, or AZURE_GPT4o_MODEL to ensure proper configuration. You can always set these variables later as environment variables in the codespace terminal." | ||
}, | ||
"AZURE_API_VERSION": { | ||
"description": "This key is required to specify the version of the Azure API you are using. Set this along with AZURE_OPENAI_API_KEY, AZURE_API_ENDPOINT, and at least one of AZURE_GPT35_MODEL, AZURE_GPT4_MODEL, or AZURE_GPT4o_MODEL for Azure OpenAI services. These variables can be configured later as environment variables in the codespace terminal." | ||
}, | ||
"AZURE_GPT35_MODEL": { | ||
"description": "This key is required if you are using Azure's GPT-3.5 model. Ensure you also set AZURE_OPENAI_API_KEY, AZURE_API_ENDPOINT, AZURE_GPT4_MODEL, AZURE_GPT4o_MODEL, and AZURE_API_VERSION for full compatibility with Azure OpenAI services. These can be configured later in the codespace terminal as environment variables." | ||
}, | ||
"AZURE_GPT4_MODEL": { | ||
"description": "This key is required if you are using Azure's GPT-4 model. It must be set along with AZURE_OPENAI_API_KEY, AZURE_API_ENDPOINT, AZURE_GPT35_MODEL, AZURE_GPT4o_MODEL, and AZURE_API_VERSION to properly integrate with Azure's OpenAI services. All keys can be added later as environment variables in the codespace terminal." | ||
}, | ||
"AZURE_GPT4o_MODEL": { | ||
"description": "This key is required if you are using Azure's GPT-4o model. Ensure that AZURE_OPENAI_API_KEY, AZURE_API_ENDPOINT, AZURE_GPT35_MODEL, AZURE_GPT4_MODEL, and AZURE_API_VERSION are also set. You can always add these later as environment variables in the codespace terminal." | ||
}, | ||
"BING_API_KEY": { | ||
"description": "This key is optional. The WebSurfer agent can work without it, but when added, it uses Bing's search and data services to improve information retrieval. You can always set it later as an environment variable in the codespace terminal." | ||
} | ||
}, | ||
"shutdownAction": "stopCompose", | ||
"workspaceFolder": "/workspaces/fastagency", | ||
// "runArgs": [], | ||
"remoteEnv": {}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": true, | ||
"installOhMyZsh": true, | ||
"configureZshAsDefaultShell": true, | ||
"username": "vscode", | ||
"userUid": "1000", | ||
"userGid": "1000" | ||
// "upgradePackages": "true" | ||
}, | ||
// "ghcr.io/devcontainers/features/python:1": {}, | ||
"ghcr.io/devcontainers/features/node:1": {}, | ||
// The below configuration with "version" set to "latest" fails in codespace | ||
// "ghcr.io/devcontainers/features/git:1": { | ||
// "version": "latest", | ||
// "ppa": true | ||
// }, | ||
"ghcr.io/devcontainers/features/git:1": {}, | ||
"ghcr.io/devcontainers/features/git-lfs:1": {}, | ||
"ghcr.io/robbert229/devcontainer-features/postgresql-client:1": {} | ||
}, | ||
"updateContentCommand": "bash .devcontainer/setup.sh", | ||
"postCreateCommand": [], | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"python.linting.enabled": true, | ||
"python.testing.pytestEnabled": true, | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": "always" | ||
}, | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.vscode-pylance" | ||
}, | ||
"editor.rulers": [ | ||
80 | ||
] | ||
}, | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-toolsai.jupyter", | ||
"ms-toolsai.vscode-jupyter-cell-tags", | ||
"ms-toolsai.jupyter-keymap", | ||
"ms-toolsai.jupyter-renderers", | ||
"ms-toolsai.vscode-jupyter-slideshow", | ||
"ms-python.vscode-pylance" | ||
] | ||
} | ||
} | ||
} |
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 was deleted.
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
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
Oops, something went wrong.