mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 04:35:49 +00:00
🔧 Change pdm to uv
This commit is contained in:
parent
79db305731
commit
b393e5957a
16
Dockerfile
16
Dockerfile
@ -10,13 +10,10 @@ RUN echo "deb http://ftp.us.debian.org/debian bookworm main non-free" >> /etc/ap
|
||||
&& apt install git wget curl ffmpeg -y \
|
||||
&& git clone -b main --recursive https://github.com/PaiGramTeam/PaiGram.git /app \
|
||||
# install dependencies \
|
||||
&& pip install virtualenv pdm \
|
||||
&& python3 -m virtualenv venv/ \
|
||||
&& . venv/bin/activate \
|
||||
&& pdm use -f venv \
|
||||
&& pdm config pypi.url https://pypi.tuna.tsinghua.edu.cn/simple/ \
|
||||
&& pdm install \
|
||||
&& pdm install -G :all \
|
||||
&& pip install virtualenv uv \
|
||||
&& python3 -m uv venv .venv \
|
||||
&& . .venv/bin/activate \
|
||||
&& uv sync --all-extras \
|
||||
&& playwright install chromium \
|
||||
&& playwright install-deps chromium \
|
||||
## set timezone
|
||||
@ -31,9 +28,8 @@ RUN echo "deb http://ftp.us.debian.org/debian bookworm main non-free" >> /etc/ap
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
~/.cache/pip \
|
||||
~/.cache/pypoetry \
|
||||
~/.cache/pdm \
|
||||
~/.cache/uv \
|
||||
# Add the wait script to the image
|
||||
&& wget -O /wait https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait \
|
||||
&& chmod +x /wait
|
||||
ENTRYPOINT /wait && venv/bin/alembic upgrade head && venv/bin/python run.py
|
||||
ENTRYPOINT /wait && .venv/bin/alembic upgrade head && .venv/bin/python run.py
|
||||
|
@ -74,15 +74,15 @@ venv\Scripts\activate.bat
|
||||
**Install Dependencies:**
|
||||
|
||||
```bash
|
||||
pip install pdm
|
||||
pdm install
|
||||
pip install uv
|
||||
uv sync
|
||||
playwright install chromium
|
||||
```
|
||||
|
||||
Optional Dependencies
|
||||
|
||||
```bash
|
||||
pdm install -G :all
|
||||
uv sync --all-extras
|
||||
```
|
||||
|
||||
**Edit Config:**
|
||||
|
@ -59,7 +59,7 @@ class UpdatePlugin(Plugin):
|
||||
await execute("git pull --all")
|
||||
await execute("git submodule update")
|
||||
if len(args) > 1:
|
||||
await execute(f"{executable} -m pdm install")
|
||||
await execute("uv sync --all-extras")
|
||||
logger.info("更新成功 正在重启")
|
||||
await reply_text.edit_text("更新成功 正在重启")
|
||||
async with async_open(UPDATE_DATA, mode="w", encoding="utf-8") as file:
|
||||
|
Loading…
Reference in New Issue
Block a user