mirror of
https://github.com/ultralytics/ultralytics
synced 2026-04-21 14:07:18 +00:00
Dockerfile cleanup (#20382)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
03412a1e26
commit
180dfa1e06
4 changed files with 8 additions and 16 deletions
|
|
@ -47,8 +47,7 @@ RUN pip install uv
|
|||
RUN uv pip install --system -e ".[export]" albumentations pycocotools "onnxruntime-gpu" tensorrt wandb
|
||||
|
||||
# Run exports to AutoInstall packages
|
||||
# Edge TPU export fails the first time so is run twice here
|
||||
RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32 || yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32
|
||||
RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32
|
||||
RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32
|
||||
RUN uv pip install --system paddlepaddle x2paddle
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ ADD https://forums.developer.nvidia.com/uploads/short-url/hASzFOm9YsJx6VVFrDW1g4
|
|||
# Replace pyproject.toml TF.js version with 'tensorflowjs>=3.9.0' for JetPack4 compatibility
|
||||
RUN sed -i 's/^\( *"tensorflowjs\)>=.*\(".*\)/\1>=3.9.0\2/' pyproject.toml
|
||||
|
||||
# Install pip packages
|
||||
# Install pip packages (pip must be upgraded first before installing uv due to missing setuptools)
|
||||
RUN python3 -m pip install --upgrade pip
|
||||
RUN python3 -m pip install uv
|
||||
RUN uv pip install --system \
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@ RUN ./bin/installdependencies.sh && \
|
|||
apt-get -y install libicu-dev
|
||||
|
||||
# Inline ENTRYPOINT command to configure and start runner with default TOKEN and NAME
|
||||
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'
|
||||
ENTRYPOINT exec 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'
|
||||
|
||||
# Usage Examples -------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -568,11 +568,6 @@ class Exporter:
|
|||
dynamic["output0"].pop(2)
|
||||
if self.args.nms and self.model.task == "obb":
|
||||
self.args.opset = opset_version # for NMSModel
|
||||
# OBB error https://github.com/pytorch/pytorch/issues/110859#issuecomment-1757841865
|
||||
try:
|
||||
torch.onnx.register_custom_op_symbolic("aten::lift_fresh", lambda g, x: x, opset_version)
|
||||
except RuntimeError: # it will fail if it's already registered
|
||||
pass
|
||||
|
||||
with arange_patch(self.args):
|
||||
export_onnx(
|
||||
|
|
@ -1025,8 +1020,6 @@ class Exporter:
|
|||
@try_export
|
||||
def export_edgetpu(self, tflite_model="", prefix=colorstr("Edge TPU:")):
|
||||
"""YOLO Edge TPU export https://coral.ai/docs/edgetpu/models-intro/."""
|
||||
LOGGER.warning(f"{prefix} Edge TPU known bug https://github.com/ultralytics/ultralytics/issues/1185")
|
||||
|
||||
cmd = "edgetpu_compiler --version"
|
||||
help_url = "https://coral.ai/docs/edgetpu/compiler/"
|
||||
assert LINUX, f"export only supported on Linux. See {help_url}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue