Compare commits
12 Commits
7065b3ef01
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b5ac1ed61b | |||
| 652ffd5c59 | |||
| 6ddbbe0fc8 | |||
| 31e73c4599 | |||
| 64908c21d7 | |||
| fc6433993f | |||
| 2f9142a77b | |||
| 6091b84311 | |||
| cbdc064646 | |||
| 614da6b7b2 | |||
| 77c76740d4 | |||
| f4e04597df |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1 +1,5 @@
|
||||
*.pth
|
||||
Qwen2-VL-2B-Instruct
|
||||
.venv
|
||||
.idea
|
||||
system.json
|
||||
43
Dockerfile
Normal file
43
Dockerfile
Normal 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
25
docker-compose.yaml
Normal 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
32
pyproject.toml
Normal 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",
|
||||
]
|
||||
Reference in New Issue
Block a user