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
  1. # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/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 YOLO single/multi-GPU training and inference tests
  4. # Start FROM Ultralytics GPU image
  5. FROM ultralytics/ultralytics:latest
  6. # Set additional environment variables for runner
  7. ENV RUNNER_ALLOW_RUNASROOT=1 \
  8. DEBIAN_FRONTEND=noninteractive
  9. # Set the working directory
  10. WORKDIR /actions-runner
  11. # Download and unpack the latest runner from https://github.com/actions/runner and install dependencies
  12. RUN FILENAME=actions-runner-linux-x64-2.323.0.tar.gz && \
  13. curl -o $FILENAME -L https://github.com/actions/runner/releases/download/v2.323.0/$FILENAME && \
  14. tar xzf $FILENAME && \
  15. rm $FILENAME && \
  16. # Install runner dependencies
  17. uv pip install --system pytest-cov && \
  18. ./bin/installdependencies.sh && \
  19. apt-get -y install libicu-dev
  20. # JSON ENTRYPOINT command to configure and start runner with default TOKEN and NAME
  21. ENTRYPOINT ["sh", "-c", "./config.sh --url https://github.com/ultralytics/ultralytics --token ${GITHUB_RUNNER_TOKEN:-TOKEN} --name ${GITHUB_RUNNER_NAME:-NAME} --labels gpu-latest --replace && ./run.sh"]
  22. # Usage Examples -------------------------------------------------------------------------------------------------------
  23. # Build and Push
  24. # t=ultralytics/ultralytics:latest-runner && sudo docker build -f docker/Dockerfile-runner -t $t . && sudo docker push $t
  25. # Pull and Run in detached mode with access to GPUs 0 and 1
  26. # 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...