Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Dockerfile 1.7KB

il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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.05-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 nvidia-tensorboard nvidia-tensorboard-plugin-dlprof
  10. RUN pip install --no-cache -r requirements.txt coremltools onnx gsutil notebook
  11. RUN pip install --no-cache -U torch torchvision numpy
  12. # RUN pip install --no-cache torch==1.9.0+cu111 torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html
  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. # Set environment variables
  19. ENV HOME=/usr/src/app
  20. # Usage Examples -------------------------------------------------------------------------------------------------------
  21. # Build and Push
  22. # t=ultralytics/yolov5:latest && sudo docker build -t $t . && sudo docker push $t
  23. # Pull and Run
  24. # t=ultralytics/yolov5:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all $t
  25. # Pull and Run with local directory access
  26. # t=ultralytics/yolov5:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all -v "$(pwd)"/datasets:/usr/src/datasets $t
  27. # Kill all
  28. # sudo docker kill $(sudo docker ps -q)
  29. # Kill all image-based
  30. # sudo docker kill $(sudo docker ps -qa --filter ancestor=ultralytics/yolov5:latest)
  31. # Bash into running container
  32. # sudo docker exec -it 5a9b5863d93d bash
  33. # Bash into stopped container
  34. # id=$(sudo docker ps -qa) && sudo docker start $id && sudo docker exec -it $id bash
  35. # Clean up
  36. # docker system prune -a --volumes