feat: .gitignore & deploy file

This commit is contained in:
zzw
2026-08-18 17:31:17 +08:00
parent 399d6042ff
commit 49df2ec952
6 changed files with 59 additions and 11 deletions
+5 -8
View File
@@ -1,8 +1,7 @@
# YOLOv8 training environment (NVIDIA GPU)
# YOLOv8 training image (NVIDIA GPU)
#
# The image contains Python, PyTorch and Ultralytics only. The project
# directory (including data.yaml, train/valid/test and *.pt files) is mounted
# at /workspace when the container is started; this keeps the image small.
# Image contains Python / PyTorch / Ultralytics + train script.
# Dataset (*.pt weights, /data/facepp, runs/) are mounted at runtime.
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
@@ -22,11 +21,10 @@ RUN apt-get update \
libxext6 \
libxrender1 \
python3 \
python3-dev \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# PyTorch 2.5.1 is paired with torchvision 0.20.1 and CUDA 12.4.
# PyTorch 2.5.1 + torchvision 0.20.1 (CUDA 12.4)
RUN python3 -m pip install --upgrade pip \
&& python3 -m pip install \
torch==2.5.1 \
@@ -36,8 +34,7 @@ RUN python3 -m pip install --upgrade pip \
WORKDIR /workspace
# These files make the image usable for a quick smoke test. The normal run
# command mounts the whole project over /workspace.
COPY train_yolov8.py data.yaml ./
ENTRYPOINT ["python3", "train_yolov8.py"]
CMD ["--model", "yolov8n.pt", "--device", "0"]