Download DEPLOY.md from princessamygdala/TreasureHuntForTwo: direct link, hf CLI and curl.
- Browser
- Download file 2.36 kB
-
https://huggingface.co/spaces/princessamygdala/TreasureHuntForTwo/resolve/main/DEPLOY.md
- Command line
-
hf download hf://spaces/princessamygdala/TreasureHuntForTwo/DEPLOY.md
-
curl -L -o DEPLOY.md https://huggingface.co/spaces/princessamygdala/TreasureHuntForTwo/resolve/main/DEPLOY.md
Deploying the task (free, hands-off) + saving data to GitLab
This task is a Python server app, so it must run somewhere. The cheapest hands-off option is Hugging Face Spaces (free CPU, no credit card, your computer can be off). Data is pushed to your gitlab.pavlovia.org repo on each finish.
1. Make a GitLab data repo (one time)
- On https://gitlab.pavlovia.org create a new project, e.g.
task_sl-cu-data(Private). Initialize it with a README so themasterbranch exists. - Create an access token: the project → Settings → Access Tokens → role
Maintainer, scopewrite_repository. Copy the token (starts withglpat-).
2. Test the GitLab push locally (optional)
cp .env.example .env # then edit .env with your token + project path
uv run python web_app.py # play to the end; finished data should appear in the repo
Each session's files land under data/<seed>/ in the repo:
*_trials.csv, *_ratings.csv, *_quiz.csv, the raw .msgpack, and a .json.
3. Host on Hugging Face Spaces (free)
Make a free account at https://huggingface.co.
New Space → Owner = you → SDK: Docker → blank → Create.
Push this folder to the Space's git repo (HF shows the exact
git remote add/git pushcommands). The includedDockerfilebuilds it automatically.Prepend this YAML block to the top of
README.mdin the Space (HF needs it):--- title: Treasure Hunt sdk: docker app_port: 7860 ---In the Space → Settings → Variables and secrets, add secrets:
GITLAB_TOKEN,GITLAB_PROJECT,GITLAB_URL,GITLAB_BRANCH,STORAGE_SECRET.The Space builds (a few minutes) and gives you a public URL like
https://<you>-treasure-hunt.hf.space, that's the link you send participants.
The Space sleeps after long inactivity and wakes on the next visit, so it costs nothing and needs no machine of yours running. Data keeps flowing into your GitLab repo.
Participant requirements
A modern desktop/laptop browser (Chrome/Safari/Firefox/Edge) with a keyboard. Not suitable for phones/tablets (it's keyboard-driven).
Other hosts
The same Dockerfile deploys to Google Cloud Run (free tier, scales to zero) or
Fly.io (paid, ~few $/mo) if you ever outgrow the free Space.