mirror of
https://github.com/exo-explore/exo.git
synced 2025-10-23 02:57:14 +03:00
t
This commit is contained in:
30
.github/bootstrap.sh
vendored
30
.github/bootstrap.sh
vendored
@@ -27,7 +27,7 @@ REPO="exo-explore/exo"
|
||||
|
||||
# Add sudoers configuration
|
||||
log "Configuring sudo access..."
|
||||
SUDOERS_CONTENT="$(whoami) ALL=(ALL) NOPASSWD: /usr/sbin/tccutil, /bin/launchctl, /usr/bin/tee /Library/LaunchDaemons/*, /usr/bin/sqlite3, /usr/libexec/ApplicationFirewall/socketfilterfw, /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart, /opt/homebrew/bin/brew, /usr/local/bin/brew, /usr/bin/xcode-select, /usr/bin/chown, /bin/mkdir, /usr/bin/touch, /usr/sbin/softwareupdate, /usr/sbin/sysctl, /usr/bin/pmset, /usr/sbin/powermetrics, /usr/bin/nice, /usr/bin/renice, /usr/bin/ionice"
|
||||
SUDOERS_CONTENT="$(whoami) ALL=(ALL) NOPASSWD: /usr/sbin/tccutil, /bin/launchctl, /usr/bin/tee /Library/LaunchDaemons/*, /usr/bin/sqlite3, /usr/libexec/ApplicationFirewall/socketfilterfw, /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart, /opt/homebrew/bin/brew, /usr/local/bin/brew, /usr/bin/xcode-select, /usr/bin/chown, /bin/mkdir, /usr/bin/touch, /usr/sbin/softwareupdate, /usr/sbin/sysctl, /usr/bin/pmset, /usr/sbin/powermetrics, /usr/bin/nice, /usr/bin/renice, /usr/bin/ionice, /bin/rm, /bin/chmod"
|
||||
echo "$SUDOERS_CONTENT" | sudo tee /etc/sudoers.d/github-runner > /dev/null
|
||||
sudo chmod 440 /etc/sudoers.d/github-runner
|
||||
|
||||
@@ -195,16 +195,36 @@ sudo tee /Library/LaunchDaemons/com.github.runner.plist > /dev/null << EOF
|
||||
<integer>0</integer>
|
||||
<key>ThrottleInterval</key>
|
||||
<integer>0</integer>
|
||||
<key>StandardOutPath</key>
|
||||
<string>${RUNNER_DIR}/stdout.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>${RUNNER_DIR}/stderr.log</string>
|
||||
<key>LowPriorityIO</key>
|
||||
<false/>
|
||||
<key>MaterializeDataless</key>
|
||||
<true/>
|
||||
<key>HardResourceLimits</key>
|
||||
<dict>
|
||||
<key>NumberOfFiles</key>
|
||||
<integer>524288</integer>
|
||||
<key>MemoryLock</key>
|
||||
<integer>-1</integer>
|
||||
</dict>
|
||||
<key>SoftResourceLimits</key>
|
||||
<dict>
|
||||
<key>NumberOfFiles</key>
|
||||
<integer>524288</integer>
|
||||
<key>MemoryLock</key>
|
||||
<integer>-1</integer>
|
||||
</dict>
|
||||
<key>EnvironmentVariables</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
|
||||
<key>MLX_USE_GPU</key>
|
||||
<string>1</string>
|
||||
<key>OBJC_DEBUG_MISSING_POOLS</key>
|
||||
<string>NO</string>
|
||||
<key>METAL_DEBUG_ERROR_MODE</key>
|
||||
<string>0</string>
|
||||
<key>METAL_DEVICE_WRAPPER_TYPE</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
27
.github/workflows/bench_job.yml
vendored
27
.github/workflows/bench_job.yml
vendored
@@ -35,6 +35,11 @@ jobs:
|
||||
HARDWARE_CONFIG: ${{ inputs.config }}
|
||||
model: ${{ inputs.model }}
|
||||
steps:
|
||||
- name: Cleanup workspace
|
||||
run: |
|
||||
sudo rm -rf "$GITHUB_WORKSPACE"
|
||||
sudo mkdir -p "$GITHUB_WORKSPACE"
|
||||
sudo chown -R $(whoami):$(id -g) "$GITHUB_WORKSPACE"
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -79,6 +84,28 @@ jobs:
|
||||
sysctl iogpu
|
||||
sysctl kern.memorystatus_purge_on_warning
|
||||
sysctl kern.memorystatus_purge_on_critical
|
||||
- name: Configure process limits
|
||||
run: |
|
||||
# Increase resource limits
|
||||
sudo launchctl limit maxfiles 524288 524288
|
||||
ulimit -n 524288
|
||||
|
||||
# Disable core dumps
|
||||
ulimit -c 0
|
||||
|
||||
# Set max locked memory to unlimited
|
||||
ulimit -l unlimited
|
||||
|
||||
# Set process priority class
|
||||
sudo chrt -f -p 99 $$
|
||||
|
||||
# Disable memory compression
|
||||
sudo nvram boot-args="vm_compressor=1"
|
||||
|
||||
# Set Metal environment variables
|
||||
export METAL_DEVICE_WRAPPER_TYPE=1
|
||||
export METAL_DEBUG_ERROR_MODE=0
|
||||
export OBJC_DEBUG_MISSING_POOLS=NO
|
||||
- name: Run exo
|
||||
env:
|
||||
aws_access_key_id: ${{ secrets.S3_EXO_BENCHMARKS_AWS_ACCESS_KEY_ID }}
|
||||
|
||||
Reference in New Issue
Block a user