mirror of https://github.com/WongKinYiu/yolov7.git
31 lines
1010 B
Docker
31 lines
1010 B
Docker
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
|
# Builds ultralytics/ultralytics:latest image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
|
|
# Image is CUDA-optimized for YOLO11 single/multi-GPU training and inference
|
|
|
|
# Start FROM PyTorch image https://hub.docker.com/r/pytorch/pytorch or nvcr.io/nvidia/pytorch:23.03-py3
|
|
FROM nvcr.io/nvidia/pytorch:23.08-py3
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
gcc git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 libsm6 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Security updates
|
|
# https://security.snyk.io/vuln/SNYK-UBUNTU1804-OPENSSL-3314796
|
|
RUN apt upgrade --no-install-recommends -y openssl tar
|
|
|
|
# Create working directory
|
|
WORKDIR /app
|
|
|
|
# Install requirements
|
|
COPY requirements.txt .
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
# Install OpenCV with CUDA support
|
|
COPY . .
|
|
RUN rm -rf ./workspace
|
|
RUN bash scripts/build_opencv.sh
|
|
|
|
# Test CUDA and OpenCV support
|
|
RUN bash scripts/test-cmds.sh |