Switch to unified view

a b/utils/docker/Dockerfile-arm64
1
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
2
# Builds ultralytics/yolov5:latest-arm64 image on DockerHub https://hub.docker.com/r/ultralytics/yolov5
3
# Image is aarch64-compatible for Apple M1 and other ARM architectures i.e. Jetson Nano and Raspberry Pi
4
5
# Start FROM Ubuntu image https://hub.docker.com/_/ubuntu
6
FROM arm64v8/ubuntu:22.10
7
8
# Downloads to user config dir
9
ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/
10
11
# Install linux packages
12
ENV DEBIAN_FRONTEND noninteractive
13
RUN apt update
14
RUN TZ=Etc/UTC apt install -y tzdata
15
RUN apt install --no-install-recommends -y python3-pip git zip curl htop gcc libgl1 libglib2.0-0 libpython3-dev
16
# RUN alias python=python3
17
18
# Install pip packages
19
COPY requirements.txt .
20
RUN python3 -m pip install --upgrade pip wheel
21
RUN pip install --no-cache -r requirements.txt albumentations gsutil notebook \
22
    coremltools onnx onnxruntime
23
    # tensorflow-aarch64 tensorflowjs \
24
25
# Create working directory
26
RUN mkdir -p /usr/src/app
27
WORKDIR /usr/src/app
28
29
# Copy contents
30
COPY . /usr/src/app
31
ENV DEBIAN_FRONTEND teletype
32
33
34
# Usage Examples -------------------------------------------------------------------------------------------------------
35
36
# Build and Push
37
# t=ultralytics/yolov5:latest-arm64 && sudo docker build --platform linux/arm64 -f utils/docker/Dockerfile-arm64 -t $t . && sudo docker push $t
38
39
# Pull and Run
40
# t=ultralytics/yolov5:latest-arm64 && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/datasets:/usr/src/datasets $t