Add Dockerfile-conda FROM continuumio/miniconda3:latest (#4706)

This commit is contained in:
Glenn Jocher 2023-09-03 23:44:11 +02:00 committed by GitHub
parent 02b857e14c
commit a1c1d6b483
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 152 additions and 28 deletions

37
docker/Dockerfile-conda Normal file
View file

@ -0,0 +1,37 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
# Builds ultralytics/ultralytics:latest-conda image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
# Image is optimized for Ultralytics Anaconda (https://anaconda.org/conda-forge/ultralytics) installation and usage
# Start FROM miniconda3 image https://hub.docker.com/r/continuumio/miniconda3
FROM continuumio/miniconda3:latest
# Downloads to user config dir
ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/
# Install linux packages
RUN apt update \
&& apt install --no-install-recommends -y libgl1-mesa-glx
# Copy contents
ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt .
# Install conda packages
# mkl required to fix 'OSError: libmkl_intel_lp64.so.2: cannot open shared object file: No such file or directory'
RUN conda config --set solver libmamba && \
conda install -c conda-forge ultralytics mkl
# conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=11.8 ultralytics
# Usage Examples -------------------------------------------------------------------------------------------------------
# Build and Push
# t=ultralytics/ultralytics:latest-conda && sudo docker build -f docker/Dockerfile-cpu -t $t . && sudo docker push $t
# Run
# t=ultralytics/ultralytics:latest-conda && sudo docker run -it --ipc=host $t
# Pull and Run
# t=ultralytics/ultralytics:latest-conda && sudo docker pull $t && sudo docker run -it --ipc=host $t
# Pull and Run with local volume mounted
# t=ultralytics/ultralytics:latest-conda && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/datasets:/usr/src/datasets $t

View file

@ -37,6 +37,7 @@ RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32
# Remove exported models
RUN rm -rf tmp
# Usage Examples -------------------------------------------------------------------------------------------------------
# Build and Push

View file

@ -37,6 +37,7 @@ RUN pip install --no-cache paddlepaddle==2.4.2 x2paddle
# Remove exported models
RUN rm -rf tmp
# Usage Examples -------------------------------------------------------------------------------------------------------
# Build and Push