Download entrypoint.sh from ummmar/cloudcode: direct link, hf CLI and curl.
- Browser
- Download file 888 Bytes
-
https://huggingface.co/spaces/ummmar/cloudcode/resolve/0419d3fc2fc16dcbc1a67d41bb08fb6d583aaf20/entrypoint.sh
- Command line
-
hf download hf://spaces/ummmar/cloudcode@0419d3fc2fc16dcbc1a67d41bb08fb6d583aaf20/entrypoint.sh
-
curl -L -o entrypoint.sh https://huggingface.co/spaces/ummmar/cloudcode/resolve/0419d3fc2fc16dcbc1a67d41bb08fb6d583aaf20/entrypoint.sh
888 Bytes
| set -e | |
| # 1. Inject Git Credentials for seamless GitHub pushing | |
| if [ -n "$GITHUB_TOKEN" ] && [ -n "$GITHUB_USER" ]; then | |
| git config --global credential.helper store | |
| git config --global user.name "$GITHUB_USER" | |
| git config --global user.email "$GITHUB_USER@users.noreply.github.com" | |
| echo "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com" > ~/.git-credentials | |
| echo "Git credentials configured." | |
| fi | |
| # 2. Link OpenCode config to our persistent directory | |
| export XDG_CONFIG_HOME="/workspace/config" | |
| export OPENCODE_CONFIG_DIR="/workspace/config/opencode" | |
| mkdir -p $OPENCODE_CONFIG_DIR | |
| # 3. Start background config sync to HF Dataset | |
| if [ -n "$HF_TOKEN" ] && [ -n "$HF_DATASET_REPO" ]; then | |
| python /sync_config.py & | |
| fi | |
| # 4. Launch OpenChamber | |
| echo "Starting OpenChamber on port 7860..." | |
| PORT=7860 openchamber --host 0.0.0.0 --workspace /workspace/projects |