Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

67 rindas
2.1KB

  1. # YOLOv5 🚀 by Ultralytics, GPL-3.0 license
  2. # Start FROM Nvidia PyTorch image https://ngc.nvidia.com/catalog/containers/nvidia:pytorch
  3. FROM nvcr.io/nvidia/pytorch:21.10-py3
  4. # Install linux packages
  5. RUN apt update && apt install -y zip htop screen libgl1-mesa-glx
  6. # Install python dependencies
  7. COPY requirements.txt .
  8. RUN python -m pip install --upgrade pip
  9. RUN pip uninstall -y torch torchvision torchtext
  10. RUN pip install --no-cache -r requirements.txt albumentations wandb gsutil notebook \
  11. torch==1.11.0+cu113 torchvision==0.12.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
  12. # RUN pip install --no-cache -U torch torchvision
  13. # Create working directory
  14. RUN mkdir -p /usr/src/app
  15. WORKDIR /usr/src/app
  16. # Copy contents
  17. RUN git clone https://github.com/ultralytics/yolov5 /usr/src/app
  18. # COPY . /usr/src/app
  19. # Downloads to user config dir
  20. ADD https://ultralytics.com/assets/Arial.ttf /root/.config/Ultralytics/
  21. # Set environment variables
  22. ENV OMP_NUM_THREADS=8
  23. # ENV HOME=/usr/src/app
  24. # Usage Examples -------------------------------------------------------------------------------------------------------
  25. # Build and Push
  26. # t=ultralytics/yolov5:latest && sudo docker build -t $t . && sudo docker push $t
  27. # Pull and Run
  28. # t=ultralytics/yolov5:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all $t
  29. # Pull and Run with local directory access
  30. # t=ultralytics/yolov5:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all -v "$(pwd)"/datasets:/usr/src/datasets $t
  31. # Kill all
  32. # sudo docker kill $(sudo docker ps -q)
  33. # Kill all image-based
  34. # sudo docker kill $(sudo docker ps -qa --filter ancestor=ultralytics/yolov5:latest)
  35. # Bash into running container
  36. # sudo docker exec -it 5a9b5863d93d bash
  37. # Bash into stopped container
  38. # id=$(sudo docker ps -qa) && sudo docker start $id && sudo docker exec -it $id bash
  39. # Clean up
  40. # docker system prune -a --volumes
  41. # Update Ubuntu drivers
  42. # https://www.maketecheasier.com/install-nvidia-drivers-ubuntu/
  43. # DDP test
  44. # python -m torch.distributed.run --nproc_per_node 2 --master_port 1 train.py --epochs 3
  45. # GCP VM from Image
  46. # docker.io/ultralytics/yolov5:latest