Skip to content

Commit

Permalink
Use venv instead of breaking system packges
Browse files Browse the repository at this point in the history
Signed-off-by: anasty17 <[email protected]>
  • Loading branch information
anasty17 committed Nov 14, 2024
1 parent efe2c21 commit f97076b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mltbenv/*
config.env
*.pyc
data*
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 . .

Expand Down
4 changes: 3 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
python3 update.py && python3 -m bot
source mltbenv/bin/activate
python3 update.py
python3 -m bot

0 comments on commit f97076b

Please sign in to comment.