Proposal: an `open-daytona` environment for self-hosted sandboxes without Docker or root

Open
#4,557 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
linux, python

Research direction

Start with the existing Daytona environment and identify how it configures its client, settings, and supported features. The proposal calls for a named open-daytona environment with its own API URL and key, plus a client-manager hook and early errors for unsupported features. Done means the environment works against open-daytona and rejects the listed unsupported features before a task starts.

Written by the indexing model from the issue text.

Description

Several issues and PRs here ask for a way to run Harbor's sandboxes on machines people already have, mostly Slurm/HPC clusters where Docker is not available and root is not either:

  • #2950 adds Apptainer support because "on the majority of HPC machines there's no sudo/fakeroot"; a comment there asks for multi-node training on HPC.
  • #2910 comes from a Slurm cluster with Apptainer and no Docker.
  • #1696 proposes an Enroot environment "for HPC clusters", and #1560 a local environment for "corporate/HPC machines where Docker is unavailable".
  • #3351 and #3526 come from users running Harbor's Singularity environment under Slurm.

open-daytona may be one more option for these users. It runs sandboxes as rootless gVisor containers on a pool of ordinary Linux nodes, Slurm allocations included, behind a gateway that serves Daytona's 0.x REST and toolbox API. So Harbor's existing Daytona environment already runs against it with only DAYTONA_API_URL and DAYTONA_API_KEY set, and the sandboxes of one job can be spread over several nodes.

Terminal-Bench 2.0 with the oracle agent, unmodified Harbor 0.27.0 at cf4bd004, daytona 0.210.0 from its lock file, -e daytona pointed at open-daytona at 281d8bb: 78 of the 89 tasks pass. 88 tasks ran as one job, 24 trials at a time, on two 24-core Slurm nodes without Docker; compile-compcert, whose agent timeout is 2400 s, ran as a job of its own and passed.

harbor run -p terminal-bench -a oracle -e daytona -y -n 24 -i <task> ...

No trial log shows a call that open-daytona does not implement. The 11 failures:

Task Cause
build-cython-ext, mcmc-sampling-stan, protein-assembly, qemu-alpine-ssh, qemu-startup also fail on hosted Daytona
build-pmars, rstan-to-pystan, make-doom-for-mips the reference solution or image installs apt package versions the Debian and Ubuntu mirrors no longer serve (not checked on hosted Daytona)
caffe-cifar-10 agent timeout on hosted Daytona too: the CIFAR-10 download server sends about 100–160 KB/s per connection
query-optimize verifier timeout (900 s): the unoptimized query took 632 s natively on these 2.2 GHz cores and 823 s in a sandbox; hosted Daytona's whole verifier took 535 s
schemelike-metacircular-eval one of 63 cases ran past its 60 s limit with 24 trials at a time; it passed 63 of 63 at low concurrency

query-optimize and schemelike-metacircular-eval show gVisor's cost on work heavy in system calls and memory mapping: measured for query-optimize (above), and for schemelike-metacircular-eval traced to about 529,000 mmap/munmap pairs in its slowest case. The measurements and the hosted Daytona runs of caffe-cifar-10, query-optimize and schemelike-metacircular-eval are in open-daytona's compatibility notes.

What I would like to add is a named environment, -e open-daytona. It would be DaytonaEnvironment with its own client and settings, OPEN_DAYTONA_API_URL and OPEN_DAYTONA_API_KEY, and it would reject up front what open-daytona does not implement, so a task gets a clear error before it starts: docker-compose tasks (no Docker-in-Docker in a gVisor sandbox), snapshots, organization secrets, network allowlists and runtime policy changes, SSH and stream mode. It needs one small change in the Daytona environment, a hook that chooses the client manager. With that branch, the same 88 tasks give the same 77 passes and the same 11 failures.

Would you take this as a PR? If you prefer, a docs line saying that -e daytona with DAYTONA_API_URL works against a self-hosted Daytona-compatible server would also help these users, and needs no code.

Dominant language
Python
Stars
5.6k
Forks
1.9k
Avg merge
1d 17h
Merged PRs (30d)
156

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from harbor-framework/harbor

All issues in harbor-framework/harbor

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.