pypy
Simon 4 years ago
parent 01dbdf9d1e
commit 315138de38

@ -38,7 +38,7 @@ from time import time,sleep,perf_counter
import importlib.util import importlib.util
import re import re
import copy import copy
from setproctitle import setproctitle #from setproctitle import setproctitle
# Twisted is pretty important, so I keep it separate # Twisted is pretty important, so I keep it separate
from twisted.internet.protocol import Factory, Protocol from twisted.internet.protocol import Factory, Protocol
@ -2137,7 +2137,7 @@ if __name__ == '__main__':
ID_MAX = 16776415 ID_MAX = 16776415
#Set process title early #Set process title early
setproctitle(__file__) #setproctitle(__file__)
# Change the current directory to the location of the application # Change the current directory to the location of the application
os.chdir(os.path.dirname(os.path.realpath(sys.argv[0]))) os.chdir(os.path.dirname(os.path.realpath(sys.argv[0])))

@ -1,15 +1,15 @@
FROM python:3.9-alpine FROM alpine
COPY entrypoint-proxy /entrypoint COPY entrypoint-proxy /entrypoint
RUN adduser -D -u 54000 radio && \ RUN adduser -D -u 54000 radio && \
apk update && \ apk update && \
apk add git gcc musl-dev && \ apk add git gcc musl-dev pypy pypy-dev && \
cd /opt && \ cd /opt && \
git clone https://github.com/hacknix/freedmr && \ git clone https://github.com/hacknix/freedmr && \
cd /opt/freedmr && \ cd /opt/freedmr && \
pip install --no-cache-dir -r requirements.txt && \ pypy3 -m pip install --no-cache-dir -r requirements.txt && \
apk del git gcc musl-dev && \ apk del git gcc musl-dev pypy-dev && \
chown -R radio: /opt/freedmr chown -R radio: /opt/freedmr
USER radio USER radio

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
cd /opt/freedmr cd /opt/freedmr
python /opt/freedmr/hotspot_proxy_v2.py & pypy3 /opt/freedmr/hotspot_proxy_v2.py &
python /opt/freedmr/playback.py -c loro.cfg & pypy3 /opt/freedmr/playback.py -c loro.cfg &
python /opt/freedmr/bridge_master.py -c freedmr.cfg -r rules.py pypy3 /opt/freedmr/bridge_master.py -c freedmr.cfg -r rules.py

Loading…
Cancel
Save

Powered by TurnKey Linux.