feat: .gitignore & deploy file
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: runner
|
||||
env:
|
||||
NAME: lone/xunlian
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://git.ailuowan.com/deploy/checkout@v4
|
||||
|
||||
- name: Login Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ vars.REGISTRY }} -u "${{ vars.REGISTRY_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Docker build
|
||||
run: |
|
||||
docker buildx build --load \
|
||||
-f Dockerfile \
|
||||
-t ${{ vars.REGISTRY }}/$NAME:latest \
|
||||
.
|
||||
|
||||
- name: Docker push
|
||||
run: |
|
||||
docker push ${{ vars.REGISTRY }}/$NAME:latest
|
||||
@@ -0,0 +1,4 @@
|
||||
*.pt
|
||||
__pycache__/
|
||||
|
||||
runs/
|
||||
+5
-8
@@ -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"]
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
path: .
|
||||
train: train/images
|
||||
val: valid/images
|
||||
test: test/images
|
||||
train: /data/facepp/train/images
|
||||
val: /data/facepp/valid/images
|
||||
test: /data/facepp/test/images
|
||||
|
||||
nc: 11
|
||||
names: ['0', '1', '10', '2', '3', '4', '5', '6', '7', '8', '9']
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
services:
|
||||
xunlian:
|
||||
image: git.ailuowan.com/lone/xunlian:latest
|
||||
gpus: all
|
||||
volumes:
|
||||
- ./yolov8n.pt:/workspace/yolov8n.pt:ro
|
||||
- ./yolov8m.pt:/workspace/yolov8m.pt:ro
|
||||
- ./yolo26n.pt:/workspace/yolo26n.pt:ro
|
||||
- /data/facepp:/data/facepp:ro
|
||||
|
||||
- ./runs:/workspace/runs
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
NVIDIA_VISIBLE_DEVICES: all
|
||||
NVIDIA_DRIVER_CAPABILITIES: compute,utility
|
||||
restart: "no"
|
||||
Reference in New Issue
Block a user