Port over local repo

This commit is contained in:
j 2025-07-09 13:03:05 +10:00
commit 676b6aa8ea
21 changed files with 1121 additions and 0 deletions

38
docker/Dockerfile Normal file
View file

@ -0,0 +1,38 @@
FROM ubuntu:25.10
# Pip is really freaking annoying now.
# We'll install venv. Install all modules into the venv using the entrypoint.
# Basics to run
RUN apt update && apt -y install python3 python3-pip
# Required for voice support
RUN apt update && apt -y install libffi-dev libnacl-dev python3-dev python3.13-venv
# Create workdir
RUN mkdir -p /app
WORKDIR /app
# Create venv
RUN python3 -m venv /venv
RUN chown -R ubuntu:ubuntu /venv
# Upload entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN chown ubuntu:ubuntu /entrypoint.sh
# Pre-install requirements
COPY requirements.txt /requirements.txt
RUN chown ubuntu:ubuntu /requirements.txt
# Ubuntu comes loaded with the ubuntu user (id 1000) so just use that.
USER ubuntu
# Install requirements and spacy core
RUN /venv/bin/pip install -r /requirements.txt
RUN /venv/bin/python -m spacy download en_core_web_sm
ENTRYPOINT ["/entrypoint.sh"]

16
docker/entrypoint.sh Normal file
View file

@ -0,0 +1,16 @@
#!/bin/bash
set -e
#source /venv/bin/activate
# Install Python deps
#if [ -f /app/requirements.txt ]
#then
# python3 -m pip install --break-system-packages -r /app/requirements.txt
#fi
#
#python3 -m spacy download en_core_web_sm
#exec python3 /app/bot.py "$@"
exec /venv/bin/python /app/bot.py "$@"

3
docker/requirements.txt Normal file
View file

@ -0,0 +1,3 @@
spacy
redis
discord.py[voice]