From 4bb7b7107dde1e60df19ff16f24fb1237c21f09b Mon Sep 17 00:00:00 2001 From: Peter DeVita Date: Sun, 19 May 2024 01:19:08 -0400 Subject: [PATCH] Use spawn mp, update Dockerfile --- Dockerfile | 6 +++--- beatrice/sound_manager/__init__.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ac2d2a7..1036d31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,8 @@ RUN /app/bin/pip install dist/`ls dist | grep .whl`[mysql,uvloop,speed,audio] -- FROM python:3.10-alpine RUN apk add bash -RUN apk add blas opusfile ffmpeg # needed for audio -RUN apk add libuv libsodium +RUN apk add blas opusfile ffmpeg libsodium # needed for audio +RUN apk add libuv COPY --from=builder /app /app WORKDIR /config -CMD ["bash", "-c", "/app/bin/beatrice"] +CMD ["/app/bin/beatrice"] diff --git a/beatrice/sound_manager/__init__.py b/beatrice/sound_manager/__init__.py index 1160580..5864c99 100644 --- a/beatrice/sound_manager/__init__.py +++ b/beatrice/sound_manager/__init__.py @@ -45,6 +45,7 @@ def _callback_id(self): return temp def start_bot(self): + multiprocessing.set_start_method("spawn") self.process = multiprocessing.Process(target=start_bot, args=(self.bot_config, self.chpipe)) self.process.start()