mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-05-04 05:58:58 +08:00
* 因pypi官网已移除低版本pyav的whl文件,改为自行编译安装,添加相关依赖 另外,因阿里云部分镜像失效导致下载超时,国内源改为清华 * 国内源切换回阿里云 * 指定python镜像的Debian版本为bullseye,默认版本为Bookworm 添加自行编译av所需的依赖
35 lines
1.5 KiB
Docker
35 lines
1.5 KiB
Docker
# 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-bullseye
|
|
|
|
WORKDIR /app/AzurLaneAutoScript
|
|
|
|
COPY requirements.txt /tmp/requirements.txt
|
|
|
|
# python:3.7-slim is based on debian:11, apt source from https://developer.aliyun.com/mirror/debian
|
|
RUN echo "\
|
|
deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib\n\
|
|
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" \
|
|
> /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
|
|
|
|
CMD python gui.py
|