2024-09-01
Docker
00

目录

cpu
selenium
GPU CUDA11.1 pytorch1.8
GPU CUDA10.2 pytorch1.8
GPU CUDA10.2 pytorch1.6.0
GPU CUDA10.1 pytorch1.7.1
YOLO
paddle OCR

cpu

miniconda3的一个基础镜像,其中安装fastapi和opencv。

kevinchina/deeplearning

.2

shell
FROM kevinchina/deeplearning:wrfbaseenv COPY deps /deps RUN rm -rf /etc/yum.repos.d/* && \ cp /deps/CentOS-Base.repo /etc/yum.repos.d/ && \ yum clean all RUN yum install wget opencv -y RUN wget http://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/conda.sh && \ /bin/bash /tmp/conda.sh -b && \ cp -f /deps/.condarc ~/ && rm /tmp/conda.sh ENV PATH ~/miniconda3/bin:$PATH RUN ~/miniconda3/bin/conda init bash && \ . ~/.bashrc && \ conda create -n py38 python=3.8.12 -y RUN . ~/.bashrc && \ conda activate py38 && \ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U && \ pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \ pip install fastapi uvicorn python-multipart requests opencv-python numpy RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

在上一个基础上,安装pytorch cpu版本 1.8

kevinchina/deeplearning

.3

shell
FROM kevinchina/deeplearning:miniconda3base0.2 RUN . ~/.bashrc && conda activate py38 && conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cpuonly -c pytorch

在上一个基础上,安装 yolo需求的包, 创建app文件夹。

成为 : kevinchina/deeplearning

.6

FROM kevinchina/deeplearning:miniconda3base0.3 RUN mkdir /app WORKDIR /app COPY requirements.txt . COPY deps/Arial.ttf /root/.config/Ultralytics/Arial.ttf RUN . ~/.bashrc && conda activate py38 && pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U RUN . ~/.bashrc && conda activate py38 && pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple RUN . ~/.bashrc && conda activate py38 && pip install -r requirements.txt
matplotlib>=3.2.2 Pillow PyYAML==5.3.1 scipy>=1.4.1 tqdm>=4.41.0 seaborn>=0.11.0 pandas Shapely==1.8.0 numpy==1.19.2 tensorboard

selenium

在kevinchina/deeplearning

.2基础上装selenium

kevinchina/deeplearning

.5

shell
FROM kevinchina/deeplearning:miniconda3base0.2 RUN . ~/.bashrc && \ conda activate py38 && \ pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U && \ pip install pandas requests selenium

GPU CUDA11.1 pytorch1.8

cuda11.1+pytorch1.8+opencv

kevinchina/deeplearning

.1pytorch1.8baseenv0.1

shell
FROM kevinchina/deeplearning:cuda11.1pytorch1.8baseenv RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

下面是kevinchina/deeplearning

.1pytorch1.8baseenv0.5:

将目前YOLOv5需要的环境安装了起来。

FROM kevinchina/deeplearning:cuda11.1pytorch1.8baseenv0.1 RUN mkdir /app WORKDIR /app COPY requirements.txt . RUN . ~/.bashrc && conda activate py38 && pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U RUN . ~/.bashrc && conda activate py38 && pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple COPY deps/Arial.ttf /root/.config/Ultralytics/Arial.ttf RUN . ~/.bashrc && conda activate py38 && pip install numpy==1.19.2 wandb tensorboard -i https://pypi.tuna.tsinghua.edu.cn/simple
matplotlib>=3.2.2 Pillow PyYAML==5.3.1 scipy>=1.4.1 tqdm>=4.41.0 seaborn>=0.11.0 pandas Shapely==1.8.0 numpy==1.19.2 tensorboard

GPU CUDA10.2 pytorch1.8

cuda10.2+pytorch1.8+opencv

kevinchina/deeplearning

.2pytorch1.8baseenv0.1

shell
FROM nvidia/cuda:10.2-cudnn7-devel-centos7 COPY deps /deps RUN rm -rf /etc/yum.repos.d/* && cp /deps/CentOS-Base.repo /etc/yum.repos.d/ && yum clean all RUN yum install wget opencv vim -y RUN wget http://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/conda.sh && \ bash /tmp/conda.sh -b && rm /tmp/conda.sh && \ cp -f /deps/.condarc /root/ RUN ~/miniconda3/bin/conda init bash && . ~/.bashrc && conda create -n py38 python=3.8.12 -y RUN . ~/.bashrc && conda activate py38 && pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U && pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && pip install fastapi uvicorn python-multipart requests opencv-python numpy RUN . ~/.bashrc && conda activate py38 && conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=10.2 -c pytorch -y RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

GPU CUDA10.2 pytorch1.6.0

shell
FROM nvidia/cuda:10.2-cudnn7-devel-centos7 COPY deps /deps RUN rm -rf /etc/yum.repos.d/* && cp /deps/CentOS-Base.repo /etc/yum.repos.d/ && yum clean all RUN yum install wget opencv vim -y RUN wget http://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/conda.sh && \ bash /tmp/conda.sh -b && rm /tmp/conda.sh && \ cp -f /deps/.condarc /root/ RUN ~/miniconda3/bin/conda init bash && . ~/.bashrc && conda create -n py38 python=3.8.12 -y RUN . ~/.bashrc && conda activate py38 && pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U && pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && pip install fastapi uvicorn python-multipart requests opencv-python numpy RUN . ~/.bashrc && conda activate py38 && conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.2 -c pytorch RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

GPU CUDA10.1 pytorch1.7.1

cuda10.1+pytorch1.7.1+opencv

kevinchina/deeplearning

.1pytorch1.7.1baseenv0.1

shell
FROM nvidia/cuda:10.1-cudnn7-devel-centos7 COPY deps /deps RUN rm -rf /etc/yum.repos.d/* && cp /deps/CentOS-Base.repo /etc/yum.repos.d/ && yum clean all RUN yum install wget opencv vim -y RUN wget http://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/conda.sh && \ bash /tmp/conda.sh -b && rm /tmp/conda.sh && \ cp -f /deps/.condarc /root/ RUN ~/miniconda3/bin/conda init bash && . ~/.bashrc && conda create -n py38 python=3.8.12 -y RUN . ~/.bashrc && conda activate py38 && pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U && pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && pip install fastapi uvicorn python-multipart requests opencv-python numpy RUN . ~/.bashrc && conda activate py38 && conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch -y RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

加一些库,加个VGG16的权重进去用。

kevinchina/deeplearning

.1pytorch1.7.1baseenv0.2

FROM kevinchina/deeplearning:cuda10.1pytorch1.7.1baseenv0.1 RUN . ~/.bashrc && conda activate py38 && pip install pymilvus pandas pillow clickhouse_driver opencv-python pillow requests COPY vgg16-397923af.pth /root/.cache/torch/hub/checkpoints/

YOLO

装了一些yolo的东西

kevinchina/deeplearning

.2torch1.8yolov0.1

python
FROM kevinchina/deeplearning:cuda10.2pytorch1.8baseenv0.1 COPY requirements.txt . COPY Arial.ttf /root/.config/Ultralytics/ RUN . ~/.bashrc && conda activate py38 && pip install -r requirements.txt #pip install -r requirements.txt # Base ---------------------------------------- matplotlib>=3.2.2 numpy>=1.18.5 Pillow PyYAML==5.3.1 requests>=2.23.0 scipy>=1.4.1 tqdm>=4.41.0 pandas requests fastapi uvicorn python-multipart seaborn>=0.11.0 pandas Shapely==1.8.0 opencv-python

paddle OCR

docker push kevinchina/deeplearning

.1

FROM paddlepaddle/paddle:2.2.1 RUN rm -f /etc/localtime RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple RUN pip install fastapi uvicorn python-multipart requests opencv-python numpy RUN unset GREP_OPTIONS COPY . /PaddleOCRAI WORKDIR /PaddleOCRAI RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip install -r requirements.txt RUN python setup.py install #ENTRYPOINT nohup python ocr_fastapi_only_one.py >/ocr.log 2>&1 &
如果对你有用的话,可以打赏哦
打赏
ali pay
wechat pay

本文作者:Dong

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC。本作品采用《知识共享署名-非商业性使用 4.0 国际许可协议》进行许可。您可以在非商业用途下自由转载和修改,但必须注明出处并提供原作者链接。 许可协议。转载请注明出处!