Use venv instead of breaking system packges

Signed-off-by: anasty17 <e.anastayyar@gmail.com>
This commit is contained in:
anasty17 2024-11-14 11:55:41 +02:00
parent efe2c21af4
commit f97076bf49
No known key found for this signature in database
GPG Key ID: EAAC8A2DF2861DE4
3 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
mltbenv/*
config.env
*.pyc
data*

View File

@ -3,8 +3,10 @@ FROM anasty17/mltb:latest
WORKDIR /usr/src/app
RUN chmod 777 /usr/src/app
RUN python3 -m venv mltbenv
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt --break-system-packages
RUN mltbenv/bin/pip install --no-cache-dir -r requirements.txt
COPY . .

View File

@ -1 +1,3 @@
python3 update.py && python3 -m bot
source mltbenv/bin/activate
python3 update.py
python3 -m bot