Compare commits

...

12 Commits

Author SHA1 Message Date
zcr
b5ac1ed61b 1 2026-04-17 11:34:05 +08:00
zcr
652ffd5c59 1 2026-04-17 11:33:10 +08:00
zcr
6ddbbe0fc8 1 2026-04-17 11:31:21 +08:00
zcr
31e73c4599 1 2026-04-17 11:30:43 +08:00
zcr
64908c21d7 1 2026-04-17 11:28:52 +08:00
zcr
fc6433993f 1 2026-04-17 11:17:58 +08:00
zcr
2f9142a77b 1 2026-04-17 11:02:59 +08:00
zcr
6091b84311 1 2026-04-17 11:00:24 +08:00
zcr
cbdc064646 1 2026-04-17 10:59:45 +08:00
zcr
614da6b7b2 1 2026-04-17 10:58:39 +08:00
zcr
77c76740d4 1 2026-04-17 10:47:03 +08:00
zcr
f4e04597df 1 2026-04-17 10:45:42 +08:00
5 changed files with 6000 additions and 1 deletions

4
.gitignore vendored
View File

@@ -1 +1,5 @@
*.pth
Qwen2-VL-2B-Instruct
.venv
.idea
system.json

43
Dockerfile Normal file
View File

@@ -0,0 +1,43 @@
FROM ghcr.io/astral-sh/uv:latest AS uv_bin
FROM nvidia/cuda:12.4.1-base-ubuntu22.04
ENV UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1 \
PYTHONUNBUFFERED=1 \
UV_PROJECT_ENVIRONMENT=/app/.venv \
TORCH_CUDA_ARCH_LIST="8.6" \
CUDA_VISIBLE_DEVICES=0 \
UV_TORCH_BACKEND=cu128
COPY --from=uv_bin /uv /uvx /bin/
#RUN apt-get update && apt-get install -y --no-install-recommends \
# ca-certificates curl gnupg && \
# sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirrors.cloud.tencent.com/ubuntu/|g' /etc/apt/sources.list && \
# sed -i 's|http://security.ubuntu.com/ubuntu/|http://mirrors.cloud.tencent.com/ubuntu/|g' /etc/apt/sources.list && \
# apt-get update && \
# apt-get install -y --no-install-recommends \
# git \
# ffmpeg libsm6 libxext6 \
# build-essential g++ \
# && apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# 3. 安装依赖 (不加 --system让 uv 创建受管的虚拟环境)
# 这里会根据 pyproject.toml 自动下载并安装 Python 3.11
COPY pyproject.toml uv.lock ./
#RUN uv sync --frozen --no-dev --no-install-project --python 3.9
# 4. 拷贝项目文件并安装项目本身
COPY . .
#RUN uv sync --frozen --no-dev --python 3.9
# 5. 【最关键】将虚拟环境的 bin 目录提到最前面
# 注意uv sync 创建的 python 就在这个目录下
ENV PATH="/app/.venv/bin:$PATH"
EXPOSE 8000
# 验证路径并运行
# 此时运行 python 实际上是运行 /app/.venv/bin/python
CMD ["sleep", "infinity"]

25
docker-compose.yaml Normal file
View File

@@ -0,0 +1,25 @@
services:
server:
container_name: aida_design2garment
build:
context: .
dockerfile: Dockerfile
working_dir: /app
volumes:
- .:/app
ports:
- "10080:8000"
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: [ '1' ]
capabilities:
- gpu
networks:
- aida_app_net
networks:
aida_app_net:
external: true
name: aida_app_net

32
pyproject.toml Normal file
View File

@@ -0,0 +1,32 @@
[project]
name = "design2garmentcode-impl"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"accelerate==1.1.1",
"cairosvg==2.7.1",
"cgal==6.0.1.post202410241521",
"datasets==2.18.0",
"huggingface-hub==0.29.2",
"libigl==2.5.1",
"markupsafe==2.1.5",
"matplotlib>=3.9.4",
"modelscope==1.18.0",
"nicegui==2.15.0",
"numpy==1.26.4",
"peft==0.13.2",
"psutil==6.0.0",
"pyrender==0.1.45",
"pyyaml==6.0.2",
"qwen-vl-utils==0.0.8",
"safetensors==0.5.3",
"scipy==1.13.1",
"svgpathtools>=1.7.2",
"svgwrite==1.4.3",
"tiktoken==0.9.0",
"tokenizers==0.20.3",
"transformers==4.46.2",
"trimesh>=4.11.5",
]

5895
uv.lock generated Normal file

File diff suppressed because it is too large Load Diff