mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 21:44:22 +08:00
Reorder Dockerfile for reduced rebuilding (#358)
This commit is contained in:
parent
4962733b49
commit
46ed5ff75e
@ -4,7 +4,12 @@
|
|||||||
|
|
||||||
# Start FROM NVIDIA PyTorch image https://ngc.nvidia.com/catalog/containers/nvidia:pytorch
|
# Start FROM NVIDIA PyTorch image https://ngc.nvidia.com/catalog/containers/nvidia:pytorch
|
||||||
FROM nvcr.io/nvidia/pytorch:22.12-py3
|
FROM nvcr.io/nvidia/pytorch:22.12-py3
|
||||||
|
|
||||||
|
# Remove torch nightly and install torch stable
|
||||||
RUN rm -rf /opt/pytorch # remove 1.2GB dir
|
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
|
# Downloads to user config dir
|
||||||
ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/
|
ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/
|
||||||
@ -22,10 +27,7 @@ RUN git clone https://github.com/ultralytics/ultralytics /usr/src/ultralytics
|
|||||||
|
|
||||||
# Install pip packages
|
# Install pip packages
|
||||||
RUN python -m pip install --upgrade pip wheel
|
RUN python -m pip install --upgrade pip wheel
|
||||||
RUN pip uninstall -y Pillow torchtext torch torchvision
|
RUN pip install --no-cache ultralytics albumentations comet gsutil notebook 'opencv-python<4.6.0.66'
|
||||||
RUN pip install --no-cache ultralytics albumentations comet gsutil notebook Pillow>=9.1.0 \
|
|
||||||
'opencv-python<4.6.0.66' \
|
|
||||||
--extra-index-url https://download.pytorch.org/whl/cu113
|
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV OMP_NUM_THREADS=1
|
ENV OMP_NUM_THREADS=1
|
||||||
|
@ -27,10 +27,8 @@ RUN git clone https://github.com/ultralytics/ultralytics /usr/src/ultralytics
|
|||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN python3 -m pip install --upgrade pip wheel
|
RUN python3 -m pip install --upgrade pip wheel
|
||||||
RUN pip install --no-cache ultralytics gsutil notebook \
|
RUN pip install --no-cache ultralytics gsutil notebook \
|
||||||
tensorflow-aarch64
|
tensorflow-aarch64 onnx onnx-simplifier onnxruntime coremltools openvino-dev
|
||||||
# tensorflowjs \
|
# tensorflowjs \
|
||||||
# onnx onnx-simplifier onnxruntime \
|
|
||||||
# coremltools openvino-dev \
|
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
ENV DEBIAN_FRONTEND teletype
|
ENV DEBIAN_FRONTEND teletype
|
||||||
|
@ -28,7 +28,8 @@ COPY requirements.txt .
|
|||||||
RUN python3 -m pip install --upgrade pip wheel
|
RUN python3 -m pip install --upgrade pip wheel
|
||||||
RUN pip install --no-cache ultralytics albumentations gsutil notebook \
|
RUN pip install --no-cache ultralytics albumentations gsutil notebook \
|
||||||
coremltools onnx onnx-simplifier onnxruntime tensorflow-cpu tensorflowjs \
|
coremltools onnx onnx-simplifier onnxruntime tensorflow-cpu tensorflowjs \
|
||||||
# openvino-dev \
|
openvino-dev \
|
||||||
|
# tensorflowjs \
|
||||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user