mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-05-04 04:48:57 +08:00
Fix:修复国内docker环境编译报错的问题 (#5624)
* 因pypi官网已移除低版本pyav的whl文件,改为自行编译安装,添加相关依赖 另外,因阿里云部分镜像失效导致下载超时,国内源改为清华 * 国内源切换回阿里云 * 指定python镜像的Debian版本为bullseye,默认版本为Bookworm 添加自行编译av所需的依赖
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# docker build -t hgjazhgj/alas:latest .
|
||||
# docker run -v ${PWD}:/app/AzurLaneAutoScript -p 22267:22267 --name alas -it --rm hgjazhgj/alas
|
||||
|
||||
FROM python:3.7-slim
|
||||
FROM python:3.7-slim-bullseye
|
||||
|
||||
WORKDIR /app/AzurLaneAutoScript
|
||||
|
||||
@@ -10,7 +10,12 @@ COPY requirements.txt /tmp/requirements.txt
|
||||
# Initial download of UiAutomator2 is slow outside of China using appetizer mirror, switch to GitHub
|
||||
RUN apt update \
|
||||
&& apt install -y git adb libgomp1 openssh-client \
|
||||
&& apt install -y build-essential pkg-config \
|
||||
&& apt install -y libavformat-dev libavcodec-dev libavdevice-dev \
|
||||
&& apt install -y libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \
|
||||
&& git config --global --add safe.directory '*' \
|
||||
&& pip install Cython==0.29.37 \
|
||||
&& pip install av==10.0.0 --no-build-isolation \
|
||||
&& pip install -r /tmp/requirements.txt \
|
||||
&& rm /tmp/requirements.txt \
|
||||
&& rm -r ~/.cache/pip
|
||||
|
||||
@@ -14,16 +14,19 @@ deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib\n\
|
||||
deb https://mirrors.aliyun.com/debian-security/ bullseye-security main\n\
|
||||
deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main\n\
|
||||
deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib\n\
|
||||
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib\n\
|
||||
deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib\n\
|
||||
deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib" \
|
||||
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib" \
|
||||
> /etc/apt/sources.list \
|
||||
&& apt update \
|
||||
&& apt install -y git adb libgomp1 openssh-client \
|
||||
&& apt install -y build-essential pkg-config \
|
||||
&& apt install -y libavformat-dev libavcodec-dev libavdevice-dev \
|
||||
&& apt install -y libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \
|
||||
&& git config --global --add safe.directory '*' \
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo 'Asia/Shanghai' > /etc/timezone \
|
||||
&& pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
|
||||
&& pip install Cython==0.29.37 \
|
||||
&& pip install av==10.0.0 --no-build-isolation \
|
||||
&& pip install -r /tmp/requirements.txt \
|
||||
&& rm /tmp/requirements.txt \
|
||||
&& rm -r ~/.cache/pip
|
||||
|
||||
Reference in New Issue
Block a user