Skip to content

Commit

Permalink
🐳 更新dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
YinAoXiong committed Dec 20, 2019
1 parent 6f0b3b6 commit f8bfa87
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 67 deletions.
7 changes: 4 additions & 3 deletions arm64v8-requirements.txt
Original file line number Diff line number Diff line change
@@ -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
10 changes: 6 additions & 4 deletions docker/amd64-Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
FROM yinaoxiong/12306_code_server:amd64-env
FROM python:3.7-slim-buster

LABEL maintainer="Yin Aoxiong <[email protected]>" \
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
Expand Down
12 changes: 0 additions & 12 deletions docker/amd64-env-Dockerfile

This file was deleted.

15 changes: 10 additions & 5 deletions docker/arm32v7-Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
FROM yinaoxiong/12306_code_server:arm32v7-env
FROM arm32v7/python:3.7-slim-buster

LABEL maintainer="Yin Aoxiong <[email protected]>" \
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"]
CMD ["gunicorn", "app:app", "-c", "gunicorn.conf.py"]
19 changes: 0 additions & 19 deletions docker/arm32v7-env-Dockerfile

This file was deleted.

15 changes: 10 additions & 5 deletions docker/arm64v8-Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
FROM yinaoxiong/12306_code_server:arm64v8-env
FROM arm64v8/python:3.7-slim-buster

LABEL maintainer="Yin Aoxiong <[email protected]>" \
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"]
CMD ["gunicorn", "app:app", "-c", "gunicorn.conf.py"]
19 changes: 0 additions & 19 deletions docker/arm64v8-env-Dockerfile

This file was deleted.

0 comments on commit f8bfa87

Please sign in to comment.