Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +59 -39
Dockerfile
CHANGED
|
@@ -1,46 +1,66 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
-
|
|
|
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
git \
|
| 10 |
-
curl \
|
| 11 |
-
wget \
|
| 12 |
-
supervisor \
|
| 13 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
/etc/supervisor/conf.d/*.conf
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
# ββ Copy and permission the entrypoint cleanup script ββββββββββββββββββββββββ
|
| 34 |
-
COPY entrypoint.sh /entrypoint.sh
|
| 35 |
-
RUN chmod +x /entrypoint.sh
|
| 36 |
-
|
| 37 |
-
# Logs directory
|
| 38 |
-
RUN mkdir -p /app/logs && chmod 777 /app/logs
|
| 39 |
-
|
| 40 |
-
# Expose only the ports our app actually uses
|
| 41 |
-
EXPOSE 7860
|
| 42 |
-
|
| 43 |
-
USER root
|
| 44 |
-
|
| 45 |
-
# Entrypoint cleans up stale state, then execs supervisord
|
| 46 |
-
CMD ["/entrypoint.sh"]
|
|
|
|
| 1 |
+
[supervisord]
|
| 2 |
+
nodaemon=true
|
| 3 |
+
user=root
|
| 4 |
+
logfile=/dev/null
|
| 5 |
+
logfile_maxbytes=0
|
| 6 |
+
pidfile=/tmp/supervisord.pid
|
| 7 |
+
loglevel=info
|
| 8 |
|
| 9 |
+
[supervisorctl]
|
| 10 |
+
serverurl=unix:///tmp/supervisor.sock
|
| 11 |
|
| 12 |
+
[unix_http_server]
|
| 13 |
+
file=/tmp/supervisor.sock
|
| 14 |
+
chmod=0700
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
[rpcinterface:supervisor]
|
| 17 |
+
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
|
|
|
| 18 |
|
| 19 |
+
[program:app]
|
| 20 |
+
command=python /app/websocket_hub.py
|
| 21 |
+
directory=/app
|
| 22 |
+
autostart=true
|
| 23 |
+
autorestart=true
|
| 24 |
+
startsecs=5
|
| 25 |
+
startretries=10
|
| 26 |
+
stopasgroup=true
|
| 27 |
+
killasgroup=true
|
| 28 |
+
stdout_logfile=/dev/stdout
|
| 29 |
+
stdout_logfile_maxbytes=0
|
| 30 |
+
stderr_logfile=/dev/stderr
|
| 31 |
+
stderr_logfile_maxbytes=0
|
| 32 |
+
environment=PORT=7860,DASHBOARD_HTML=/app/hub_dashboard.html,PYTHONUNBUFFERED=1
|
| 33 |
|
| 34 |
+
[program:worker1]
|
| 35 |
+
command=python /app/Quasar_axrvi_ranker.py --hub ws://localhost:7860/ws/subscribe --sync
|
| 36 |
+
directory=/app
|
| 37 |
+
autostart=true
|
| 38 |
+
autorestart=true
|
| 39 |
+
startsecs=5
|
| 40 |
+
startretries=10
|
| 41 |
+
stopasgroup=true
|
| 42 |
+
killasgroup=true
|
| 43 |
+
stdout_logfile=/dev/stdout
|
| 44 |
+
stdout_logfile_maxbytes=0
|
| 45 |
+
stderr_logfile=/dev/stderr
|
| 46 |
+
stderr_logfile_maxbytes=0
|
| 47 |
+
environment=PYTHONUNBUFFERED=1
|
| 48 |
|
| 49 |
+
[program:dashboard]
|
| 50 |
+
command=python3 /app/hub_dashboard_service.py
|
| 51 |
+
directory=/app
|
| 52 |
+
autostart=true
|
| 53 |
+
autorestart=true
|
| 54 |
+
startsecs=5
|
| 55 |
+
startretries=10
|
| 56 |
+
stopasgroup=true
|
| 57 |
+
killasgroup=true
|
| 58 |
+
stdout_logfile=/dev/stdout
|
| 59 |
+
stdout_logfile_maxbytes=0
|
| 60 |
+
stderr_logfile=/dev/stderr
|
| 61 |
+
stderr_logfile_maxbytes=0
|
| 62 |
+
environment=PYTHONUNBUFFERED=1,DASHBOARD_HTML=/app/hub_dashboard.html,RANKER_LOG_DIR=/app/ranker_logs,DASHBOARD_PORT=8051
|
| 63 |
|
| 64 |
+
[group:space]
|
| 65 |
+
programs=app,worker1,dashboard
|
| 66 |
+
priority=999
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|