Simplify Dockerfile WORKDIR (#14750)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
f8454f1ab7
commit
01977dac41
8 changed files with 28 additions and 47 deletions
|
|
@ -5,9 +5,6 @@
|
|||
# Use the official Python 3.10 slim-bookworm as base image
|
||||
FROM python:3.10-slim-bookworm
|
||||
|
||||
# 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 \
|
||||
|
|
@ -19,12 +16,12 @@ RUN apt update \
|
|||
&& apt install --no-install-recommends -y python3-pip 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 python3.11/EXTERNALLY-MANAGED or use 'pip install --break-system-packages' avoid 'externally-managed-environment' Ubuntu nightly error
|
||||
# RUN rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
|
||||
|
|
@ -54,4 +51,4 @@ RUN rm -rf tmp
|
|||
# t=ultralytics/ultralytics:latest-python && sudo docker pull $t && sudo docker run -it --ipc=host $t
|
||||
|
||||
# Pull and Run with local volume mounted
|
||||
# t=ultralytics/ultralytics:latest-python && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/shared/datasets:/usr/src/datasets $t
|
||||
# t=ultralytics/ultralytics:latest-python && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/shared/datasets:/datasets $t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue