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
|
|
@ -6,7 +6,6 @@
|
|||
FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime
|
||||
|
||||
# Set environment variables
|
||||
ENV APP_HOME /usr/src/ultralytics
|
||||
# Avoid DDP error "MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library" https://github.com/pytorch/pytorch/issues/37377
|
||||
ENV MKL_THREADING_LAYER=GNU
|
||||
|
||||
|
|
@ -26,12 +25,12 @@ RUN apt update \
|
|||
RUN apt upgrade --no-install-recommends -y openssl tar
|
||||
|
||||
# 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 .
|
||||
|
||||
# Install pip packages
|
||||
RUN python3 -m pip install --upgrade pip wheel
|
||||
|
|
@ -62,7 +61,7 @@ RUN rm -rf tmp
|
|||
# t=ultralytics/ultralytics:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus '"device=2,3"' $t
|
||||
|
||||
# Pull and Run with local directory access
|
||||
# t=ultralytics/ultralytics:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all -v "$(pwd)"/shared/datasets:/usr/src/datasets $t
|
||||
# t=ultralytics/ultralytics:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all -v "$(pwd)"/shared/datasets:/datasets $t
|
||||
|
||||
# Kill all
|
||||
# sudo docker kill $(sudo docker ps -q)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue