更新 pikpak自动验证的docker服务器

pull/7108/head
xiaokai 2024-08-30 17:09:38 +07:00
parent ec6778072e
commit 6b1e91964c
2 changed files with 7 additions and 6 deletions

View File

@ -38,9 +38,10 @@ FROM ubuntu as pikpak_server
RUN apt update && \
apt install -y git
WORKDIR /app
RUN git clone https://github.com/wangjunkai2022/auto_pikpak.git --depth 1
WORKDIR /app/auto_pikpak
COPY --from=install_py /app/auto_pikpak/venv /app/auto_pikpak/venv
RUN git clone --depth=1 --recurse-submodules https://github.com/wangjunkai2022/pikpak_captcha_server.git
WORKDIR /app/pikpak_captcha_server
RUN rm -rf /app/pikpak_captcha_server/pikpak_captcha/ai/ai_train_pikpak
COPY --from=install_py /app/auto_pikpak/venv /app/pikpak_captcha_server/venv
FROM ubuntu
ARG INSTALL_FFMPEG=false
@ -53,7 +54,7 @@ RUN apt update && \
apt install -y bash ca-certificates tzdata ffmpeg
# 复制 auto_pikpak 到第二阶段
COPY --from=pikpak_server /app/auto_pikpak /app/auto_pikpak
COPY --from=pikpak_server /app/pikpak_captcha_server /app/pikpak_captcha_server
COPY --from=build_alist /app/bin/alist ./
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh && /entrypoint.sh version

View File

@ -4,11 +4,11 @@ chown -R ${PUID}:${PGID} /opt/alist/
umask ${UMASK}
# 指定 Python 程序的工作目录
PYTHON_DIR="/app/auto_pikpak"
PYTHON_DIR="/app/pikpak_captcha_server"
# 启动 Python 程序
(
cd "$PYTHON_DIR" && /app/auto_pikpak/venv/bin/python3 server.py &
cd "$PYTHON_DIR" && /app/pikpak_captcha_server/venv/bin/python3 server.py &
)
if [ "$1" = "version" ]; then