Simplify Dockerfile WORKDIR (#14750)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-07-28 17:49:07 +02:00 committed by GitHub
parent f8454f1ab7
commit 01977dac41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 28 additions and 47 deletions

View file

@ -5,9 +5,6 @@
# Start FROM https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-pytorch
FROM nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3
# Set environment variables
ENV APP_HOME /usr/src/ultralytics
# Downloads to user config dir
ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf \
@ -21,12 +18,12 @@ RUN apt update \
&& apt install --no-install-recommends -y gcc git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0
# Create working directory
WORKDIR $APP_HOME
WORKDIR /ultralytics
# Copy contents and assign permissions
COPY . $APP_HOME
COPY . .
RUN git remote set-url origin https://github.com/ultralytics/ultralytics.git
ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt $APP_HOME
ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt .
# Remove opencv-python from Ultralytics dependencies as it conflicts with opencv-python installed in base image
RUN grep -v "opencv-python" pyproject.toml > temp.toml && mv temp.toml pyproject.toml