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-runner 1.7 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 GitHub actions CI runner image for deployment to DockerHub https://hub.docker.com/r/ultralytics/ultralytics
  3. # Image is CUDA-optimized for YOLOv8 single/multi-GPU training and inference tests
  4. # Start FROM Ultralytics GPU image
  5. FROM ultralytics/ultralytics:latest
  6. # Set the working directory
  7. WORKDIR /actions-runner
  8. # Download and unpack the latest runner from https://github.com/actions/runner
  9. RUN FILENAME=actions-runner-linux-x64-2.309.0.tar.gz && \
  10. curl -o $FILENAME -L https://github.com/actions/runner/releases/download/v2.309.0/$FILENAME && \
  11. tar xzf $FILENAME && \
  12. rm $FILENAME
  13. # Install runner dependencies
  14. ENV RUNNER_ALLOW_RUNASROOT=1
  15. ENV DEBIAN_FRONTEND=noninteractive
  16. RUN ./bin/installdependencies.sh && \
  17. apt-get -y install libicu-dev
  18. # Inline ENTRYPOINT command to configure and start runner with default TOKEN and NAME
  19. ENTRYPOINT sh -c './config.sh --url https://github.com/ultralytics/ultralytics \
  20. --token ${GITHUB_RUNNER_TOKEN:-TOKEN} \
  21. --name ${GITHUB_RUNNER_NAME:-NAME} \
  22. --labels gpu-latest \
  23. --replace && \
  24. ./run.sh'
  25. # Usage Examples -------------------------------------------------------------------------------------------------------
  26. # Build and Push
  27. # t=ultralytics/ultralytics:latest-runner && sudo docker build -f docker/Dockerfile-runner -t $t . && sudo docker push $t
  28. # Pull and Run in detached mode with access to GPUs 0 and 1
  29. # t=ultralytics/ultralytics:latest-runner && sudo docker run -d -e GITHUB_RUNNER_TOKEN=TOKEN -e GITHUB_RUNNER_NAME=NAME --ipc=host --gpus '"device=0,1"' $t
Tip!

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

Comments

Loading...