|
|
|
@ -5,15 +5,14 @@
|
|
|
|
|
# Start FROM NVIDIA PyTorch image https://ngc.nvidia.com/catalog/containers/nvidia:pytorch
|
|
|
|
|
FROM nvcr.io/nvidia/pytorch:22.12-py3
|
|
|
|
|
|
|
|
|
|
# Downloads to user config dir
|
|
|
|
|
ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/
|
|
|
|
|
|
|
|
|
|
# Remove torch nightly and install torch stable
|
|
|
|
|
RUN rm -rf /opt/pytorch # remove 1.2GB dir
|
|
|
|
|
RUN pip uninstall -y torchtext torch torchvision
|
|
|
|
|
RUN pip cache purge
|
|
|
|
|
RUN pip install --no-cache torch torchvision
|
|
|
|
|
|
|
|
|
|
# Downloads to user config dir
|
|
|
|
|
ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/
|
|
|
|
|
|
|
|
|
|
# Install linux packages
|
|
|
|
|
RUN apt update && apt install --no-install-recommends -y zip htop screen libgl1-mesa-glx
|
|
|
|
|
|
|
|
|
@ -36,7 +35,7 @@ ENV OMP_NUM_THREADS=1
|
|
|
|
|
# Usage Examples -------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# Build and Push
|
|
|
|
|
# t=ultralytics/ultralytics:latest && sudo docker build -f utils/docker/Dockerfile -t $t . && sudo docker push $t
|
|
|
|
|
# t=ultralytics/ultralytics:latest && sudo docker build -f docker/Dockerfile -t $t . && sudo docker push $t
|
|
|
|
|
|
|
|
|
|
# Pull and Run
|
|
|
|
|
# t=ultralytics/ultralytics:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all $t
|
|
|
|
|