Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Gradio Dev",
"image": "mcr.microsoft.com/devcontainers/python:3.11",

"postStartCommand": "bash .devcontainer/setup-env.sh",

"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter"
]
}
}
}
20 changes: 20 additions & 0 deletions .devcontainer/setup-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e

# Go to workspace root (where .env should live)
cd /workspaces/"${GITHUB_REPOSITORY##*/}" 2>/dev/null || cd /workspaces

echo "Regenerating .env from Codespaces secrets..."

# Overwrite .env each time
cat > .env <<EOF
# Auto-generated from Codespaces secrets. Do NOT commit this file.

OPENAI_API_KEY=${OPENAI_API_KEY}
ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
GOOGLE_API_KEY=${GOOGLE_API_KEY}
DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY}
GROQ_API_KEY=${GROQ_API_KEY}
EOF

echo ".env generated."
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ celerybeat.pid

# Environments
.env
.env.*
.venv
env/
venv/
Expand Down