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.

65 rindas
2.0KB

  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.10.2+cu113 torchvision==0.11.3+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. COPY . /usr/src/app
  18. # Downloads to user config dir
  19. ADD https://ultralytics.com/assets/Arial.ttf /root/.config/Ultralytics/
  20. # Set environment variables
  21. # ENV HOME=/usr/src/app
  22. # Usage Examples -------------------------------------------------------------------------------------------------------
  23. # Build and Push
  24. # t=ultralytics/yolov5:latest && sudo docker build -t $t . && sudo docker push $t
  25. # Pull and Run
  26. # t=ultralytics/yolov5:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all $t
  27. # Pull and Run with local directory access
  28. # t=ultralytics/yolov5:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all -v "$(pwd)"/datasets:/usr/src/datasets $t
  29. # Kill all
  30. # sudo docker kill $(sudo docker ps -q)
  31. # Kill all image-based
  32. # sudo docker kill $(sudo docker ps -qa --filter ancestor=ultralytics/yolov5:latest)
  33. # Bash into running container
  34. # sudo docker exec -it 5a9b5863d93d bash
  35. # Bash into stopped container
  36. # id=$(sudo docker ps -qa) && sudo docker start $id && sudo docker exec -it $id bash
  37. # Clean up
  38. # docker system prune -a --volumes
  39. # Update Ubuntu drivers
  40. # https://www.maketecheasier.com/install-nvidia-drivers-ubuntu/
  41. # DDP test
  42. # python -m torch.distributed.run --nproc_per_node 2 --master_port 1 train.py --epochs 3
  43. # GCP VM from Image
  44. # docker.io/ultralytics/yolov5:latest