Skyrun
Run your projects on cloud compute.
Skyrun allows to smoothly execute your project on Modal CPU or GPU compute, streams live terminal output, and downloads saved files. Optional bidirectional sync brings selected changes back into your working project. Your scripts need no Modal imports or runner decorators.
The package exposes a CLI and Python API, with a provider interface for future backends.
NOTE: this is a community version and supports a limited number if providers (Modal is the first supported provider since 0.1.0). Enterprise version supports all neoclouds, AWS/GCP/Azure and custom infra.
Quick start · Examples · Configuration · File sync · Python API & architecture · Publishing
Why Skyrun
- Run anywhere philosophy. Run the same scripts locally or remotely using ordinary argv commands, sibling imports, and filesystem paths.
- Flexible sourcing. Only the chosen project folder is scanned;
.modalignorecontrols eligible files, just like.gitignore - Lazy and efficient file transfers. Immutable source files are reused by content hash. Artifact downloads stream to disk with atomic file replacement.
- Remote [machine] is here experience. Live PTY output supports normal tqdm progress bars, carriage returns, Unicode, and cursor movement. Full logs remain available.
- Graceful stops. Ctrl-C signals the workload process group, allows checkpoint cleanup, then commits and retrieves saved files. Repeated requests escalate.
- Selective round trips. Explicitly chosen files or directories return to the working project with integrity checks and conflict detection.
- Extensible infrastructure - run anywhere. Provider SDKs stay behind adapters. Core config, snapshots, examples, and dry runs work without cloud authentication.
Installation I
pip install 'skyrun[modal]'
Installation II (from source code)
Use Python 3.11+ and an authenticated Modal account. From this repository:
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[modal]'
python -m modal setup # only if this environment is not already authenticated
conda create -n skyrun python=3.12 -y
conda activate skyrun
pip install -e '.[modal]'
python -m modal setup # only if this environment is not already authenticated
Generating a sample config, so one can update it for your case:
skyrun init /tmp/skyrun-hello --example hello
cd /tmp/skyrun-hello
skyrun --dry-run
skyrun run
Modal compatibility
| Skyrun | Modal SDK | Status |
|---|---|---|
| 0.1.8 | 1.3.1–1.3.5 | Offline regression suite checked against each SDK version |
| 0.1.3–0.1.5 | 1.3.1 | Known working baseline; pin Modal when using these releases |
The Modal extra supports modal>=1.3.1,<1.4. Modal 1.3.3–1.3.5 removed the
show_progress argument used by older Skyrun releases. Skyrun 0.1.6 supports both
output APIs, keeping Modal's progress display quiet while preserving live raw
workload output, terminal progress bars, Ctrl-C handling, and artifact downloads.
The checks above are offline; they do not allocate cloud compute. See the
release notes for details.
For Skyrun 0.1.3–0.1.5, pin the SDK in the same Python environment:
python -m pip install 'modal==1.3.1'
Quick start
The hello example uses CPU and the Python standard library. Expect
Hello from skyrun, exit 0, and runs/<run-id>/outputs/hello.json. Actual runs
allocate resources in your Modal account; initialization and dry runs are offline.
For an existing project, run skyrun init in its folder, configure its remote
requirements, inspect uploads, and invoke its normal command:
skyrun run --gpu T4 --timeout 1800 -- python train.py --epochs 5
# Select a folder explicitly using configuration stored elsewhere:
skyrun run --config /path/to/skyrun.toml --project-dir /path/to/project -- python train.py
Arguments after -- go directly to the subprocess. The command's working directory
is the uploaded project root. The complete quick start
explains installation, dependencies, saved files, and recovery.
Examples included with every installation
| Example | Create a runnable project | Default compute | What it shows |
|---|---|---|---|
| Hello | skyrun init hello --example hello |
CPU | Minimal command, live logs, saved JSON |
| Training | skyrun init training --example training |
T4 | PyTorch, tqdm, Ctrl-C checkpoint save |
| Inference | skyrun init inference --example inference |
T4 | Hardware report, pinned Qwen model, model cache |
Then enter the created directory and run skyrun --dry-run followed by
skyrun run. Examples include their configuration, ignore file, and any required
remote dependencies. They are package resources, so users of a wheel get the same
samples as repository users. See commands and expected outputs.
Configuration
Use skyrun.toml or [tool.skyrun] in pyproject.toml. Runtime resources belong
under [run]; provider settings belong under [modal]. A typical configuration is:
provider = "modal"
[run]
app_name = "my-project"
gpu = "T4"
timeout_seconds = 1800
shutdown_grace_seconds = 60
[image]
python_version = "3.11"
requirements = "requirements-gpu.txt"
apt_packages = ["git"]
[sync]
project_dir = "src"
output_dirs = ["outputs", "checkpoints"]
local_dir = "runs"
[workload]
command = ["python", "train.py"]
terminal = true
Relative paths are based on the configuration directory; output paths and ignore
rules are based on the project folder. Unspecified Volume names derive from the
application name. Local environments and credentials are not copied. Configure
workload variables in [environment] and private values through named Modal
Secrets. See the configuration reference.
Optional bidirectional sync
Output directories always download into the run directory. To bring selected files back into your original working project, add an explicit selection:
[sync]
project_dir = "src"
output_dirs = ["outputs", "checkpoints"]
bidirectional = ["settings.json", "data/processed"]
Selected files upload at launch. New and modified selected files return after
execution, including handled failures and stops. Local changes made during the
run cause a conflict: local files stay intact and remote versions remain under
runs/<run-id>/_sync/files/. Use --no-sync to defer application or recover with
an explicit conflict policy:
skyrun download RUN_ID --sync --sync-conflict local
skyrun download RUN_ID --sync --sync-conflict remote
Sync runs at launch/completion boundaries. Deletions are reported, never propagated
automatically. Selections are literal paths, obey .modalignore, and must not
overlap output directories. See sync rules and resumable checkpoints.
Logs, interruption, and recovery
Each invocation creates runs/<run-id>/ with the submitted manifest, execution
status, complete _runner/console.log, and configured output files. Model caches
persist on a separate Volume. Source blobs use their own content-addressed Volume.
Press Ctrl-C once to request SIGINT and allow workload cleanup. A second press
forces the workload to stop while the wrapper retrieves saved files. A third is
an emergency cancellation. Your code must save its own checkpoint, for example
from finally; the runner cannot serialize an arbitrary model automatically.
Normal exits preserve the command's exit code. Cancellation returns 130 and
timeout returns 124. A timeout includes the configured cleanup allowance.
Recover committed files without allocating a GPU:
skyrun download RUN_ID
skyrun download RUN_ID --output-dir /tmp/recovered
The client is synchronous. Losing its connection is not a graceful stop request; a hard kill or preemption may leave only previously committed files. The output stream supports terminal output and progress bars; it does not forward interactive stdin. See operations and exit codes.
Architecture
LOCAL MACHINE MODAL CONTAINER
┌──────────────────────────────────────────────────────────────────┐ ┌────────────────────────────────────────┐
│ CLI / SDK Entrypoint ($ skyrun --gpu A100 -- python train.py) │ │ Remote Runner Engine │
│ ───────────────────────────────────────────────────────────── │ │ ─────────────────────────────────── │
│ 1. Parse Config (`pyproject.toml` or `skyrun.toml`) │ │ 1. Mount Artifact Volume │
│ 2. Scan & Hash Source │ │ 2. Extract Source Bundle │
│ 3. Pack In-Memory Zip/Tar Archive │ │ 3. Set Up Process Group + PTY │
│ 4. Invoke Remote Modal App │ ────> │ 4. Execute Subprocess (eg.`train.py`)│
│ │ │ 5. Catch Signals / Harvest Artifacts │
│ 5. Stream Live Logs / Terminal Output (PTY) │ <──── │ 6. Save to `/artifacts/<run_id>/` │
│ 6. Download Artifacts to `runs/<run_id>/` │ │ │
└──────────────────────────────────────────────────────────────────┘ └────────────────────────────────────────┘
Python API
from skyrun import download, run
result = run("skyrun.toml", gpu="L4", command=["python", "train.py"])
print(result.run_id, result.status, result.returncode, result.directory)
download(result.run_id, "skyrun.toml", output_dir="/tmp/recovered")
The provider contract supports third-party adapters through the skyrun.providers
entry-point group. See architecture and extension points.
Development and releases
python -m pip install -e '.[modal,dev]'
python -m pytest
python -m ruff check .
python -m ruff format --check .
python -m build
python -m twine check --strict dist/*
python tools/check_dist.py
Offline tests exercise real subprocess lifecycle behavior, source policy, transport interruption, recovery, and sync conflicts. Live Modal tests require explicit opt-in. Read validation for the test boundaries and GPU release checks.
The publishing guide covers namespace ownership, building and checking distributions, clean-wheel example validation, TestPyPI rehearsal, Trusted Publishing, manual uploads, release tags, and post-release verification. The repository includes CI and separate TestPyPI/PyPI publish jobs.
Contributions follow CONTRIBUTING.md and the code of conduct. See AUTHORS.md, security reporting, and the changelog. Skyrun is licensed under MIT.
Metadata
Release files for skyrun 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| skyrun-0.1.8.tar.gz | 78.2 kB | With provenance | Details for skyrun-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| skyrun-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for skyrun-0.1.8-py3-none-any.whl |
Total release size: 120.7 kB
Release files / skyrun-0.1.8.tar.gz
| Download URL | skyrun-0.1.8.tar.gz |
|---|---|
| Size | 78.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
892def818fca3b8c162c2f5bc3be9c06714afe6dff0123ae279ee7c5464f48e7
|
|
BLAKE2b-256 checksum How to use checksums |
f8786158787680c02635c63398e5bfc565fc87b5e4a538aa9e70f286cc0ee1c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / skyrun-0.1.8-py3-none-any.whl
| Download URL | skyrun-0.1.8-py3-none-any.whl |
|---|---|
| Size | 42.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70fce6c86d9454ca5b9a2a8fd8145dc25cce4f11052b939749664bdd6e76d5a9
|
|
BLAKE2b-256 checksum How to use checksums |
fe4f66cb62864db209c3c056518dc7e927951fd9e69f357f0c092cf56402c25e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for skyrun 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for skyrun-0.1.8.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.