Spaces:
Running
Running
Download openenv.yaml from suraj291/Survival_Island_Game: direct link, hf CLI and curl.
- Browser
- Download file 3.17 kB
-
https://huggingface.co/spaces/suraj291/Survival_Island_Game/resolve/main/openenv.yaml
- Command line
-
hf download hf://spaces/suraj291/Survival_Island_Game/openenv.yaml
-
curl -L -o openenv.yaml https://huggingface.co/spaces/suraj291/Survival_Island_Game/resolve/main/openenv.yaml
3.17 kB
| name: Survival_Island | |
| version: "1.0.0" | |
| description: > | |
| An AI-powered 2-D survival simulation where a HuggingFace LLM agent | |
| autonomously makes survival decisions across a procedurally-generated | |
| 6000 Γ 3000 world. Built for the Meta PyTorch Hackathon. | |
| # ββ Hugging Face Space ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| space: | |
| repo_id: suraj291/Survival_Island # change to your HF username/repo | |
| sdk: docker | |
| hardware: cpu-basic # upgrade to gpu-t4-small for local inference | |
| title: "Survival Island β LLM Survival Agent" | |
| emoji: ποΈ | |
| colorFrom: green | |
| colorTo: blue | |
| pinned: false | |
| # ββ Secrets / Variables (set in HF Space β Settings β Variables and secrets) | |
| env: | |
| secrets: | |
| - name: HF_TOKEN | |
| description: > | |
| HuggingFace API token (read scope is enough for Inference API). | |
| Also baked into the Vite bundle as VITE_HF_TOKEN at build time. | |
| variables: | |
| - name: HF_MODEL | |
| default: "meta-llama/Llama-3.1-8B-Instruct" | |
| description: > | |
| Any HF chat/instruct model compatible with the [INST] prompt format. | |
| If you prefer a different model, use HuggingFaceH4/blackbird-7b or | |
| meta-llama/Llama-3.1-8B-Instruct (the latter may require license acceptance). | |
| - name: PORT | |
| default: "7860" | |
| description: Port exposed by the Docker container (HF Spaces default). | |
| # ββ Build βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| build: | |
| dockerfile: Dockerfile | |
| context: . | |
| steps: | |
| - name: install_python_deps | |
| run: pip install -r requirements.txt --no-cache-dir | |
| - name: build_frontend | |
| run: | | |
| cd ui | |
| npm ci | |
| npm run build | |
| env: | |
| VITE_HF_TOKEN: "${HF_TOKEN}" | |
| VITE_HF_MODEL: "${HF_MODEL}" | |
| # ββ Runtime services ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| services: | |
| backend: | |
| type: fastapi | |
| entrypoint: "uvicorn server.app:app --host 0.0.0.0 --port 8000 --workers 1" | |
| healthcheck: "/api/health" | |
| frontend: | |
| type: static | |
| serve_dir: "ui/dist" | |
| # ββ Model / hardware ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| model: | |
| framework: pytorch | |
| task: text-generation | |
| device: cpu # set to cuda on gpu-* hardware tiers | |
| load_in_8bit: false | |
| # ββ Push ignore list ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| push: | |
| ignore: | |
| - "ui/node_modules" | |
| - "ui/.vite" | |
| - "ui/dist" | |
| - "__pycache__" | |
| - "*.pyc" | |
| - ".env" | |
| - ".env.local" | |
| - "ui/.env.local" | |
| - ".git" | |