Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Dockerfile-conda 1.8 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  1. # Ultralytics YOLO 🚀, AGPL-3.0 license
  2. # Builds ultralytics/ultralytics:latest-conda image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
  3. # Image is optimized for Ultralytics Anaconda (https://anaconda.org/conda-forge/ultralytics) installation and usage
  4. # Start FROM miniconda3 image https://hub.docker.com/r/continuumio/miniconda3
  5. FROM continuumio/miniconda3:latest
  6. # Downloads to user config dir
  7. ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/
  8. # Install linux packages
  9. RUN apt update \
  10. && apt install --no-install-recommends -y libgl1
  11. # Copy contents
  12. ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt .
  13. # Install conda packages
  14. # mkl required to fix 'OSError: libmkl_intel_lp64.so.2: cannot open shared object file: No such file or directory'
  15. RUN conda config --set solver libmamba && \
  16. conda install pytorch torchvision pytorch-cuda=11.8 -c pytorch -c nvidia && \
  17. conda install -c conda-forge ultralytics mkl
  18. # conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=11.8 ultralytics mkl
  19. # Usage Examples -------------------------------------------------------------------------------------------------------
  20. # Build and Push
  21. # t=ultralytics/ultralytics:latest-conda && sudo docker build -f docker/Dockerfile-cpu -t $t . && sudo docker push $t
  22. # Run
  23. # t=ultralytics/ultralytics:latest-conda && sudo docker run -it --ipc=host $t
  24. # Pull and Run
  25. # t=ultralytics/ultralytics:latest-conda && sudo docker pull $t && sudo docker run -it --ipc=host $t
  26. # Pull and Run with local volume mounted
  27. # t=ultralytics/ultralytics:latest-conda && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/datasets:/usr/src/datasets $t
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...