-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pytorch 2.1.1 and cuda 12 build targets added
- Loading branch information
1 parent
b031d1f
commit 8005a69
Showing
5 changed files
with
88 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
build/COPY_ROOT/etc/supervisor/supervisord/conf.d/serverless.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[program:serverless] | ||
command=/opt/ai-dock/bin/supervisor-serverless.sh | ||
process_name=%(program_name)s | ||
numprocs=1 | ||
directory=/root | ||
priority=100 | ||
autostart=true | ||
startsecs=2 | ||
startretries=3 | ||
autorestart=unexpected | ||
stopsignal=TERM | ||
stopwaitsecs=10 | ||
stopasgroup=true | ||
killasgroup=true | ||
stdout_logfile=/var/log/supervisor/serverless.log | ||
stdout_logfile_maxbytes=10MB | ||
stdout_logfile_backups=1 | ||
redirect_stderr=true | ||
environment=PROC_NAME="%(program_name)s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
trap cleanup EXIT | ||
|
||
function cleanup() { | ||
kill $(jobs -p) > /dev/null 2>&1 | ||
} | ||
|
||
function start() { | ||
if [[ ${SERVERLESS,,} != true ]]; then | ||
printf "Refusing to start serverless worker without \$SERVERLESS=true\n" | ||
exec sleep 10 | ||
fi | ||
|
||
# Delay launch until workspace is ready | ||
# This should never happen - Don't sync on serverless! | ||
if [[ -f /run/workspace_sync || -f /run/container_config ]]; then | ||
while [[ -f /run/workspace_sync || -f /run/container_config ]]; do | ||
sleep 1 | ||
done | ||
fi | ||
printf "Serverless worker started: %s\n" "$(date +"%x %T.%3N")" >> /var/log/timing_data | ||
printf "Starting %s serverless worker...\n" ${CLOUD_PROVIDER} | ||
|
||
if [[ ${CLOUD_PROVIDER} = "runpod.io" ]]; then | ||
exec micromamba -n serverless run \ | ||
python -u /opt/serverless/providers/runpod/worker.py | ||
else | ||
printf "No serverless worker available in this environment" | ||
exec sleep 10 | ||
fi | ||
} | ||
|
||
start 2>&1 |