Set up a site¶
Your organisation can run its analyses on a computer at its own site. The runner on that computer takes the organisation's jobs from the youSleep platform and runs each one there:
- Analyses. For each run, the runner fetches a copy of the recording, blanks the patient and recording identification in its header (and the start date, if the project removes dates), runs the analysis, uploads the result, and deletes its copy.
- Ingests. It reads each new recording once, in a container with no network, so the platform can check the recording and take its annotations. Ingests come before analyses, take a quarter of a core and 512 MiB each, and cost nothing.
- Deletes. When your organisation keeps its recordings in its own bucket, which the platform cannot reach, the runner deletes an uploaded copy there when someone deletes the recording (Keep recordings in your own bucket).
The recordings and the results stay in the platform's storage, or in your bucket. Data and security says what reaches youSleep.
This page says who does what, and in which order. The steps on the platform are on the Compute page of your organisation (Organisation → Compute), which its owner and admins see. It shows each step's state.
Who does what¶
| Step | Who | Where |
|---|---|---|
| 1. Request on-site compute | The organisation's owner | The platform |
| 2. Accept the site agreement | The organisation's owner | The platform |
| 3. Turn on on-site compute | youSleep | |
| 4. Prepare a computer | Your IT | Your site |
| 5. Install the runner, with an enrolment token | Your IT, with an owner or admin | The computer and the platform |
| 6. Approve the runner | An owner or admin | The platform |
| 7. Move the organisation's analyses to the site | An owner or admin | The platform |
Your IT can prepare the computer while steps 1 to 3 are under way. The network approvals in particular can take a while at a hospital.
1 to 3: on the platform¶
- The owner requests on-site compute, Run analyses on your own hardware, on the Compute page or the Organisation page, with a note on what it is for.
- The owner accepts the site agreement on the organisation's behalf, on the same pages. The acceptance is recorded with the version, the owner's name and the time. A new version of the agreement needs a new acceptance. An organisation that youSleep operates itself needs none.
- youSleep turns on-site compute on, once the owner has asked and accepted. The decision shows on the Compute page.
4: what your IT prepares¶
The computer that runs the analyses needs:
- Linux on x86_64, with systemd and cgroup v2. Graphics cards (GPUs) are not used yet.
- Rootless Podman 5.7 or later. Ubuntu 26.04, RHEL 9.8 and RHEL 10.2 include it in their standard packages; older releases need a newer Podman. The install delegates the cpu, memory and pids controllers to the runner's user if they are not delegated already.
- The cores and memory it offers to analyses, and disk space for the analyses' images and for each running job's files. By default the runner offers all the cores but one, and the memory less a quarter, keeping at least 2 GiB for the computer.
- A volume for the runner's home, where it keeps its key and each job's files while the job runs. Use an encrypted one.
- A clock kept in time, as by NTP: the platform refuses requests whose time is far off.
- Someone who can run commands as root, to install.
The network allow-list¶
The runner only connects out, over HTTPS. It opens no port, and nothing
connects to it. Your firewall must let it reach the platform
(api.yousleep.ai), the storage addresses Add a runner shows, and the
container registries (ghcr.io and pkg-containers.githubusercontent.com).
The network allow-list lists
each destination with its port and what it carries.
If the host reaches the internet only through a proxy, the runner uses it
(--https-proxy at install, with --proxy-bypass for hosts on your network
such as your bucket). If the proxy inspects TLS, or your own certificate
authority signed your bucket's certificate, give the runner that certificate
(--ca-bundle). doctor says how the runner connects out and what it
trusts. Install the runner has the options.
5: install the runner¶
An owner or admin opens Compute → Add a runner on the platform, together with the person who installs. The page builds every command from the settings you choose there: the runner's name, the cores and memory it offers, its home, and a registry login if you use one.
- Write the install files on the computer, from the runner's image named by its digest, as the page shows it. This can be done first: it pulls the runner's image.
- Create an enrolment token on the page. It enrols one runner, once, and works for a short time; the page says until when. Create it when the person installing is at the computer.
- Save the token in a file only you can read, and run the install script as root with the options the page shows. The script reads the token from the file on standard input, so no command line or shell history holds it. Delete the file once the runner has enrolled.
The script checks the computer, creates the runner's user, enrols the runner,
pulls the images it may be asked to run and starts it. It ends by printing
the runner's key fingerprint, which starts with SHA256:.
If the runner's home is on another disk that the runner's user cannot reach,
the first run stops and names a setfacl command that lets it pass. Run that
command, then the same install command again: the token is used only once the
runner enrols, so it still works.
Install the runner explains the script and every option.
6: approve the runner¶
The Add a runner page waits for the runner and shows it once it has enrolled, with the end of its fingerprint. The owner or an admin approves it there, or in the runners on the Compute page, with the whole fingerprint as the script printed it on the computer. Read it on the computer itself, not from a message: the platform compares it with the runner's key, and refuses an approval that differs.
Once approved, the runner takes work from its next request, within a minute.
7: check it, and move the analyses¶
- On the Compute page, the runner is Active, and the site shows Runner taking work: Yes.
- On the computer,
doctorchecks the host and pulls the analyses' images, andstatusshows the runner as the platform holds it (Check the runner).
Then an owner or admin chooses Run analyses at your site on the Compute page; the platform allows it once a runner at the site is taking work, and the same page moves them back to youSleep's servers. The change applies from the next analysis started; analyses already queued stay where they are. From then on, your members' run dialog and each analysis's details say Your organisation's site.
If youSleep turns on-site compute off¶
Your settings go off with it: analyses of projects on youSleep's servers
then run there, and new projects keep their recordings there. Projects whose
recordings are in your bucket stay there, but their analyses cannot run
until it is on again. Your runners still do their storage jobs, deleting
files from your bucket and reading the recordings already uploaded to it,
and nothing else; the Compute page and status say so. Turning it on again
does not switch your settings back on: an owner or admin does that.
Operate, upgrade and remove¶
Operate the runner covers the checks, the log, sending a support bundle, changing a setting, upgrades, and removal. To remove a runner, revoke it on the Compute page first: the platform refuses it from then on, and the runner stops.