diff --git a/arm64v8-requirements.txt b/arm64v8-requirements.txt index 9489cc0..d16306d 100644 --- a/arm64v8-requirements.txt +++ b/arm64v8-requirements.txt @@ -1,6 +1,7 @@ flask==1.1.1 -pillow==6.2.0 gunicorn==19.9.0 -gevent==1.4.0 -numpy==1.17.4 +https://cdn.yinaoxiong.cn/wheels/numpy-1.17.4-cp37-cp37m-linux_aarch64.whl +https://cdn.yinaoxiong.cn/wheels/Pillow-6.2.0-cp37-cp37m-linux_aarch64.whl +https://cdn.yinaoxiong.cn/wheels/greenlet-0.4.15-cp37-cp37m-linux_aarch64.whl +https://cdn.yinaoxiong.cn/wheels/gevent-1.4.0-cp37-cp37m-linux_aarch64.whl https://dl.google.com/coral/python/tflite_runtime-1.14.0-cp37-cp37m-linux_aarch64.whl \ No newline at end of file diff --git a/docker/amd64-Dockerfile b/docker/amd64-Dockerfile index ab7045b..2467cab 100644 --- a/docker/amd64-Dockerfile +++ b/docker/amd64-Dockerfile @@ -1,15 +1,17 @@ -FROM yinaoxiong/12306_code_server:amd64-env +FROM python:3.7-slim-buster LABEL maintainer="Yin Aoxiong " \ reference="https://github.com/yinaoxiong/12306_code_server" -ENV WORKERS 1 - WORKDIR /app COPY . . -RUN set -ex && bash download_model.sh +RUN set -ex && \ + apt-get update && apt-get install -y wget && \ + bash download_model.sh && \ + rm -rf /var/lib/apt/lists/* && \ + pip install --no-cache-dir -r requirements.txt # 服务运行在80端口 EXPOSE 80 diff --git a/docker/amd64-env-Dockerfile b/docker/amd64-env-Dockerfile deleted file mode 100644 index 1c1dd5c..0000000 --- a/docker/amd64-env-Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM python:3.7-slim-buster - -LABEL maintainer="Yin Aoxiong " \ - reference="https://github.com/yinaoxiong/12306_code_server" - -WORKDIR /app - -COPY requirements.txt requirements.txt - -RUN set -ex && apt-get update && apt-get install -y wget && \ - rm -rf /var/lib/apt/lists/* && \ - pip install --no-cache-dir -r requirements.txt diff --git a/docker/arm32v7-Dockerfile b/docker/arm32v7-Dockerfile index 8087d11..ae7aca0 100644 --- a/docker/arm32v7-Dockerfile +++ b/docker/arm32v7-Dockerfile @@ -1,17 +1,22 @@ -FROM yinaoxiong/12306_code_server:arm32v7-env +FROM arm32v7/python:3.7-slim-buster LABEL maintainer="Yin Aoxiong " \ reference="https://github.com/yinaoxiong/12306_code_server" -ENV WORKERS 1 - WORKDIR /app +COPY qemu/qemu-arm-static /usr/bin/qemu-arm-static COPY . . -RUN set -ex && bash download_model.sh +RUN set -ex && \ + apt-get update && \ + apt-get install -y libwebpdemux2 libzstd1 libopenjp2-7 libjbig0 libtiff5 liblcms2-2 libwebp6 libwebpmux3 \ + libatlas3-base libgfortran5 wget && \ + rm -rf /var/lib/apt/lists/* && \ + pip install --no-cache-dir --extra-index-url=https://www.piwheels.org/simple -r arm32v7-requirements.txt && \ + bash download_model.sh # 服务运行在80端口 EXPOSE 80 -CMD ["gunicorn", "app:app", "-c", "gunicorn.conf.py"] \ No newline at end of file +CMD ["gunicorn", "app:app", "-c", "gunicorn.conf.py"] diff --git a/docker/arm32v7-env-Dockerfile b/docker/arm32v7-env-Dockerfile deleted file mode 100644 index 46591ad..0000000 --- a/docker/arm32v7-env-Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM arm32v7/python:3.7-slim-buster - -LABEL maintainer="Yin Aoxiong " \ - reference="https://github.com/yinaoxiong/12306_code_server" - -WORKDIR /app - -COPY qemu/qemu-arm-static /usr/bin/qemu-arm-static -COPY arm32v7-requirements.txt requirements.txt - -RUN set -ex && \ - apt-get update && \ - apt-get install -y build-essential gfortran libopenblas-dev pkg-config wget \ - libtiff5-dev libjpeg-dev libopenjp2-7-dev zlib1g-dev \ - libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk \ - libharfbuzz-dev libfribidi-dev && \ - rm -rf /var/lib/apt/lists/* && \ - pip install --no-cache-dir Cython && \ - pip install --no-cache-dir -r requirements.txt diff --git a/docker/arm64v8-Dockerfile b/docker/arm64v8-Dockerfile index b4d030b..368bc6b 100644 --- a/docker/arm64v8-Dockerfile +++ b/docker/arm64v8-Dockerfile @@ -1,17 +1,22 @@ -FROM yinaoxiong/12306_code_server:arm64v8-env +FROM arm64v8/python:3.7-slim-buster LABEL maintainer="Yin Aoxiong " \ reference="https://github.com/yinaoxiong/12306_code_server" -ENV WORKERS 1 - WORKDIR /app +COPY qemu/qemu-aarch64-static /usr/bin/qemu-aarch64-static COPY . . -RUN set -ex && bash download_model.sh +RUN set -ex && \ + apt-get update && \ + apt-get install -y libwebpdemux2 libzstd1 libopenjp2-7 libjbig0 libtiff5 liblcms2-2 libwebp6 libwebpmux3 \ + libopenblas-base libgfortran5 wget && \ + rm -rf /var/lib/apt/lists/* && \ + pip install --no-cache-dir -r arm64v8-requirements.txt && \ + bash download_model.sh # 服务运行在80端口 EXPOSE 80 -CMD ["gunicorn", "app:app", "-c", "gunicorn.conf.py"] \ No newline at end of file +CMD ["gunicorn", "app:app", "-c", "gunicorn.conf.py"] diff --git a/docker/arm64v8-env-Dockerfile b/docker/arm64v8-env-Dockerfile deleted file mode 100644 index 45be3de..0000000 --- a/docker/arm64v8-env-Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM arm64v8/python:3.7-slim-buster - -LABEL maintainer="Yin Aoxiong " \ - reference="https://github.com/yinaoxiong/12306_code_server" - -WORKDIR /app - -COPY qemu/qemu-aarch64-static /usr/bin/qemu-aarch64-static -COPY arm64v8-requirements.txt requirements.txt - -RUN set -ex && \ - apt-get update && \ - apt-get install -y build-essential gfortran libopenblas-dev pkg-config wget \ - libtiff5-dev libjpeg-dev libopenjp2-7-dev zlib1g-dev \ - libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk \ - libharfbuzz-dev libfribidi-dev && \ - rm -rf /var/lib/apt/lists/* && \ - pip install --no-cache-dir Cython && \ - pip install --no-cache-dir -r requirements.txt