Import upstream snapshot c19f713c415a699a79d71cd96aa13c3104a05047
nightly / Test against latest dependencies (py3.10) (push) Has been cancelled
nightly / Test against latest dependencies (py3.13) (push) Has been cancelled
tests / tests (3.13, locked) (push) Has been cancelled
tests / tests (3.13, unlocked) (push) Has been cancelled
tests / pyright (3.10) (push) Has been cancelled
tests / lint-format (push) Has been cancelled
tests / tests (3.10, locked) (push) Has been cancelled
tests / tests (3.11, locked) (push) Has been cancelled
tests / tests (3.12, locked) (push) Has been cancelled
tests / pyright (3.11) (push) Has been cancelled
tests / pyright (3.12) (push) Has been cancelled
tests / pyright (3.13) (push) Has been cancelled
tests / ty-check (3.10) (push) Has been cancelled
tests / ty-check (3.11) (push) Has been cancelled
tests / ty-check (3.12) (push) Has been cancelled
tests / ty-check (3.13) (push) Has been cancelled
tests / stubs (push) Has been cancelled
tests / smoke-test (push) Has been cancelled
Docker / check_paths (push) Has been cancelled
Docker / build (push) Has been cancelled
docs / build (push) Has been cancelled
nightly / Test against latest dependencies (py3.10) (push) Has been cancelled
nightly / Test against latest dependencies (py3.13) (push) Has been cancelled
tests / tests (3.13, locked) (push) Has been cancelled
tests / tests (3.13, unlocked) (push) Has been cancelled
tests / pyright (3.10) (push) Has been cancelled
tests / lint-format (push) Has been cancelled
tests / tests (3.10, locked) (push) Has been cancelled
tests / tests (3.11, locked) (push) Has been cancelled
tests / tests (3.12, locked) (push) Has been cancelled
tests / pyright (3.11) (push) Has been cancelled
tests / pyright (3.12) (push) Has been cancelled
tests / pyright (3.13) (push) Has been cancelled
tests / ty-check (3.10) (push) Has been cancelled
tests / ty-check (3.11) (push) Has been cancelled
tests / ty-check (3.12) (push) Has been cancelled
tests / ty-check (3.13) (push) Has been cancelled
tests / stubs (push) Has been cancelled
tests / smoke-test (push) Has been cancelled
Docker / check_paths (push) Has been cancelled
Docker / build (push) Has been cancelled
docs / build (push) Has been cancelled
Upstream: https://github.com/michaelgillett/mjlab Upstream-Commit: c19f713c415a699a79d71cd96aa13c3104a05047 Upstream-Branch: main
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
# Systemd Setup for Nightly Benchmarks
|
||||
|
||||
This directory contains systemd user service and timer files for running nightly
|
||||
mjlab benchmarks.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
# 1. Create user systemd directory if it doesn't exist
|
||||
mkdir -p ~/.config/systemd/user
|
||||
|
||||
# 2. Copy the service and timer files
|
||||
cp mjlab-nightly.service ~/.config/systemd/user/
|
||||
cp mjlab-nightly.timer ~/.config/systemd/user/
|
||||
|
||||
# 3. Edit the service file to set your WANDB_API_KEY
|
||||
# Get your key from: https://wandb.ai/authorize
|
||||
nano ~/.config/systemd/user/mjlab-nightly.service
|
||||
|
||||
# 4. Reload systemd
|
||||
systemctl --user daemon-reload
|
||||
|
||||
# 5. Enable and start the timer
|
||||
systemctl --user enable mjlab-nightly.timer
|
||||
systemctl --user start mjlab-nightly.timer
|
||||
|
||||
# 6. Enable lingering (so timer runs even when you're not logged in)
|
||||
sudo loginctl enable-linger $USER
|
||||
```
|
||||
|
||||
## Useful Commands
|
||||
|
||||
```bash
|
||||
# Check timer status
|
||||
systemctl --user status mjlab-nightly.timer
|
||||
|
||||
# List all timers and when they'll run next
|
||||
systemctl --user list-timers
|
||||
|
||||
# Run the benchmark manually (without waiting for timer)
|
||||
systemctl --user start mjlab-nightly.service
|
||||
|
||||
# View logs
|
||||
journalctl --user -u mjlab-nightly.service -f
|
||||
|
||||
# View recent logs
|
||||
journalctl --user -u mjlab-nightly.service --since "1 hour ago"
|
||||
|
||||
# Disable the timer
|
||||
systemctl --user disable mjlab-nightly.timer
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Edit `~/.config/systemd/user/mjlab-nightly.service` to customize:
|
||||
|
||||
- `Environment="CUDA_DEVICE=0"` - Which GPU to use
|
||||
- `Environment="WANDB_API_KEY=..."` - Your WandB API key
|
||||
- `MemoryMax=32G` - Memory limit for the training job
|
||||
|
||||
Edit `~/.config/systemd/user/mjlab-nightly.timer` to change the schedule:
|
||||
|
||||
- `OnCalendar=*-*-* 02:00:00` - Default: 2 AM daily
|
||||
- `OnCalendar=Mon *-*-* 02:00:00` - Example: Mondays only at 2 AM
|
||||
- `OnCalendar=*-*-* 02,14:00:00` - Example: Twice daily at 2 AM and 2 PM
|
||||
@@ -0,0 +1,38 @@
|
||||
# mjlab Nightly Benchmark Service
|
||||
#
|
||||
# Installation:
|
||||
# 1. Copy this file to ~/.config/systemd/user/mjlab-nightly.service
|
||||
# 2. Edit the paths below to match your setup
|
||||
# 3. Enable with: systemctl --user enable mjlab-nightly.timer
|
||||
# 4. Start with: systemctl --user start mjlab-nightly.timer
|
||||
#
|
||||
# To run manually: systemctl --user start mjlab-nightly.service
|
||||
# To check logs: journalctl --user -u mjlab-nightly.service
|
||||
|
||||
[Unit]
|
||||
Description=mjlab Nightly Training Benchmark
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
# Update these paths to match your setup
|
||||
Environment="PATH=/home/kevin/.local/bin:/home/kevin/.cargo/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
Environment="HOME=/home/kevin"
|
||||
Environment="CUDA_DEVICE=0"
|
||||
Environment="WANDB_API_KEY="
|
||||
|
||||
WorkingDirectory=/home/kevin/dev/mjlab
|
||||
ExecStart=/home/kevin/dev/mjlab/scripts/benchmarks/nightly_train.sh
|
||||
|
||||
# Logging
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
# Resource limits (adjust as needed)
|
||||
Nice=10
|
||||
MemoryMax=32G
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,28 @@
|
||||
# mjlab Nightly Benchmark Timer
|
||||
#
|
||||
# This timer triggers the nightly training run.
|
||||
# Default: 2:00 AM daily
|
||||
#
|
||||
# Installation:
|
||||
# 1. Copy to ~/.config/systemd/user/mjlab-nightly.timer
|
||||
# 2. Enable: systemctl --user enable mjlab-nightly.timer
|
||||
# 3. Start: systemctl --user start mjlab-nightly.timer
|
||||
#
|
||||
# Check status: systemctl --user list-timers
|
||||
# Check next run: systemctl --user status mjlab-nightly.timer
|
||||
|
||||
[Unit]
|
||||
Description=Run mjlab nightly benchmarks
|
||||
|
||||
[Timer]
|
||||
# Run at 2:00 AM every day
|
||||
OnCalendar=*-*-* 02:00:00
|
||||
|
||||
# Add randomized delay up to 30 minutes to avoid thundering herd
|
||||
RandomizedDelaySec=1800
|
||||
|
||||
# If missed (e.g., machine was off), run on next boot
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user