Dockerfile 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. FROM ubuntu:20.04
  2. ENV DEBIAN_FRONTEND noninteractive
  3. RUN echo "Update apt:" \
  4. && set -x \
  5. && apt-get update \
  6. && apt-get dist-upgrade -y \
  7. && apt-get install -y \
  8. wget unzip git apt-utils
  9. RUN echo "Install Python v3.8:" \
  10. && set -x \
  11. # && apt-get dist-upgrade -y \
  12. # && apt-get update \
  13. && apt-get install -y \
  14. python3-dev \
  15. python3-pip \
  16. python3-setuptools \
  17. python3-wheel \
  18. && pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
  19. && pip3 config set global.extra-index-url https://pypi.doubanio.com/simple \
  20. && pip3 config set global.extra-index-url https://mirrors.163.com/pypi/simple \
  21. && pip3 config set global.extra-index-url https://mirrors.cloud.tencent.com/pypi/simple \
  22. && pip3 config set global.extra-index-url https://mirror.baidu.com/pypi/simple \
  23. && pip3 install --upgrade --quiet pip setuptools \
  24. && python3 --version
  25. RUN echo "Install OpenCV v4.2.0:" \
  26. && set -x \
  27. && apt-get update \
  28. && apt-get install -y libopencv-dev python3-opencv \
  29. && python3 -c "import cv2; print(cv2.__version__)"
  30. # --- set ffmpeg ---
  31. RUN apt-get install --no-install-recommends -y git ffmpeg supervisor
  32. # --- install requirements ---
  33. RUN echo "Install Python Requirements:" \
  34. && pip3 install --default-timeout=1800 --no-cache-dir \
  35. # --- for base --- \
  36. cython==3.0.0a9 \
  37. pyinstaller==4.10 \
  38. # --- for libraries --- \
  39. pycrypto==2.6.1 \
  40. paramiko==2.7.2 \
  41. apscheduler==3.7.0 \
  42. # --- for client --- \
  43. requests==2.25.1 \
  44. redis==3.5.3 \
  45. pymongo==3.11.2 \
  46. influxdb==5.3.1 \
  47. pymysql==0.9.3 \
  48. peewee==3.17.0 \
  49. SQLAlchemy==1.4.30 \
  50. # --- for server --- \
  51. aiofiles==23.2.1 \
  52. python-multipart==0.0.6 \
  53. starlette==0.32.0 \
  54. fastapi==0.108.0 \
  55. fastapi-login==1.9.2 \
  56. uvicorn==0.13.3 \
  57. werkzeug==3.0.1 \
  58. itsdangerous==1.1.0 \
  59. && echo "End."
  60. # --- for server --- \
  61. # aiofiles==0.6.0 \
  62. # python-multipart==0.0.5 \
  63. # starlette==0.13.6 \
  64. # fastapi==0.63.0 \
  65. # fastapi-login==1.5.2 \
  66. # supervisor==4.2.1 \
  67. # uvicorn==0.13.3 \
  68. # werkzeug==1.0.1 \
  69. # itsdangerous==1.1.0 \
  70. #RUN echo "Install Torch v1.6.0:" \
  71. # && pip3 install torch==1.6.0 torchvision==0.7.0 \
  72. # && python3 -c "import torch; print(torch.__version__)"
  73. #RUN echo "Install Torch v1.9.0:" \
  74. # && set -x \
  75. # && apt-get install -y build-essential cmake \
  76. # && pip3 install torch==1.9.0 torchvision==0.10.0 \
  77. # && python3 -c "import torch; print(torch.__version__)"
  78. #COPY ./source/box.com/onnxruntime_gpu-1.10.0-cp38-cp38-linux_aarch64.whl /opt/onnxruntime_gpu-1.10.0-cp38-cp38-linux_aarch64.whl
  79. #RUN echo "Install onnxruntime:" \
  80. # && pip3 install numpy==1.19.4 \
  81. # && pip3 install /opt/onnxruntime_gpu-1.10.0-cp38-cp38-linux_aarch64.whl \
  82. # && echo "End."