You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 line
1.4KB

  1. # YOLOv5 🚀 by Ultralytics, GPL-3.0 license
  2. # Start FROM Ubuntu image https://hub.docker.com/_/ubuntu
  3. FROM ubuntu:20.04
  4. # Downloads to user config dir
  5. ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/
  6. # Install linux packages
  7. RUN apt update
  8. RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y tzdata
  9. RUN apt install -y python3-pip git zip curl htop screen libgl1-mesa-glx libglib2.0-0
  10. # RUN alias python=python3
  11. # Install pip packages
  12. COPY requirements.txt .
  13. RUN python3 -m pip install --upgrade pip
  14. RUN pip install --no-cache -r requirements.txt albumentations gsutil notebook \
  15. coremltools onnx onnx-simplifier onnxruntime openvino-dev tensorflow-cpu tensorflowjs \
  16. torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu
  17. # Create working directory
  18. RUN mkdir -p /usr/src/app
  19. WORKDIR /usr/src/app
  20. # Copy contents
  21. COPY . /usr/src/app
  22. RUN git clone https://github.com/ultralytics/yolov5 /usr/src/yolov5
  23. # Usage Examples -------------------------------------------------------------------------------------------------------
  24. # Build and Push
  25. # t=ultralytics/yolov5:latest-cpu && sudo docker build -f utils/docker/Dockerfile-cpu -t $t . && sudo docker push $t
  26. # Pull and Run
  27. # t=ultralytics/yolov5:latest-cpu && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/datasets:/usr/src/datasets $t