Spaces:
Running
Running
| import os, json | |
| os.makedirs('.devcontainer', exist_ok=True) | |
| cfg = { | |
| "name": "Headroom Eval + Whale", | |
| "image": "mcr.microsoft.com/devcontainers/python:3.11", | |
| "features": { | |
| "ghcr.io/devcontainers/features/git:1": {}, | |
| "ghcr.io/devcontainers/features/nix:1": {} | |
| }, | |
| "postCreateCommand": "pip install -r requirements.txt && curl -fsSL https://whale.setup | sh 2>/dev/null || echo 'whale: install manually'", | |
| "customizations": { | |
| "vscode": { | |
| "extensions": ["ms-python.python", "mkhl.direnv"] | |
| } | |
| }, | |
| "forwardPorts": [7860], | |
| "portsAttributes": {"7860": {"label": "Gradio", "onAutoForward": "openPreview"}} | |
| } | |
| json.dump(cfg, open('.devcontainer/devcontainer.json','w'), indent=2) | |
| print('.devcontainer + whale + nix written') | |