76 lines
2.3 KiB
Text
76 lines
2.3 KiB
Text
# Service manager for the full Unsloth image (Dockerfile.studio).
|
|
#
|
|
# Mirrors the service set of the production docker.io/unsloth/unsloth image:
|
|
# studio Unsloth Studio web UI port 8000
|
|
# jupyter JupyterLab for the notebooks port $JUPYTER_PORT (default 8888)
|
|
# sshd key-only SSH for cloud hosts port 22
|
|
#
|
|
# All three log to stdout/stderr so `docker logs` shows everything, including
|
|
# Studio's first-boot password and Jupyter's startup line.
|
|
|
|
[unix_http_server]
|
|
file=/run/supervisor.sock
|
|
chmod=0700
|
|
|
|
[supervisorctl]
|
|
serverurl=unix:///run/supervisor.sock
|
|
|
|
[rpcinterface:supervisor]
|
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
|
|
|
[supervisord]
|
|
nodaemon=true
|
|
pidfile=/run/supervisord.pid
|
|
logfile=/dev/null
|
|
logfile_maxbytes=0
|
|
loglevel=info
|
|
|
|
[program:studio]
|
|
command=%(ENV_UNSLOTH_STUDIO_HOME)s/bin/unsloth studio -H 0.0.0.0 -p 8000
|
|
directory=/workspace
|
|
autostart=true
|
|
autorestart=true
|
|
startretries=3
|
|
startsecs=5
|
|
environment=HOME="/root",USER="root"
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|
|
|
|
[program:jupyter]
|
|
command=jupyter lab --no-browser --ip=0.0.0.0 --port=%(ENV_JUPYTER_PORT)s --allow-root --notebook-dir=/workspace
|
|
directory=/workspace
|
|
autostart=true
|
|
autorestart=true
|
|
; HOME pins config lookup to /root/.jupyter (where the launcher wrote the
|
|
; password config); without it an unset HOME falls back to token auth.
|
|
environment=HOME="/root",USER="root"
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|
|
|
|
; Optional public Cloudflare quick-tunnel for JupyterLab. Started only when
|
|
; UNSLOTH_JUPYTER_CLOUDFLARE=1 (studio_launch.sh exports a 0 default so this
|
|
; expands). The trycloudflare URL is printed to docker logs by cloudflared.
|
|
[program:jupyter-cloudflare]
|
|
command=/usr/local/bin/unsloth-jupyter-tunnel
|
|
directory=/workspace
|
|
autostart=%(ENV_UNSLOTH_JUPYTER_CLOUDFLARE)s
|
|
autorestart=true
|
|
startsecs=5
|
|
environment=HOME="/root",USER="root"
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|
|
|
|
[program:sshd]
|
|
command=/usr/sbin/sshd -D -e
|
|
autostart=%(ENV_UNSLOTH_ENABLE_SSHD)s
|
|
autorestart=true
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|