KaiWu commited on
Commit
d3b5ef6
·
1 Parent(s): 219250e

chore(deploy): 新增 Docker 与 HF Spaces 部署配置

Browse files

- Dockerfile: 基于 micromamba 构建 aigc 环境,暴露 7860 端口,
默认 AIGC_ARTIFACT_ROOT=/data/outputs 写入 HF Spaces 持久化卷
- .dockerignore: 排除 .git/.env/outputs/data 等无需入镜像的文件
- README.md: 增加 HF Spaces 所需 front-matter 与 Secrets 说明
- .gitignore: 忽略 data/,避免容器运行时数据进入版本控制

Files changed (4) hide show
  1. .dockerignore +7 -0
  2. .gitignore +1 -0
  3. Dockerfile +17 -0
  4. README.md +25 -0
.dockerignore ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ .git
2
+ .env
3
+ __pycache__/
4
+ *.pyc
5
+ .DS_Store
6
+ outputs/
7
+ data/
.gitignore CHANGED
@@ -20,6 +20,7 @@ env/
20
 
21
  # Generated CAD artifacts
22
  outputs/
 
23
 
24
  # OS and editor files
25
  .DS_Store
 
20
 
21
  # Generated CAD artifacts
22
  outputs/
23
+ data/
24
 
25
  # OS and editor files
26
  .DS_Store
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM mambaorg/micromamba:1.5.8
2
+
3
+ WORKDIR /app
4
+
5
+ COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml
6
+ RUN micromamba create -y -f /tmp/environment.yml && micromamba clean --all --yes
7
+
8
+ COPY --chown=$MAMBA_USER:$MAMBA_USER . /app
9
+
10
+ ENV AIGC_ARTIFACT_ROOT=/data/outputs
11
+ ENV GRADIO_SERVER_NAME=0.0.0.0
12
+ ENV GRADIO_SERVER_PORT=7860
13
+ ENV PYTHONUNBUFFERED=1
14
+
15
+ EXPOSE 7860
16
+
17
+ CMD ["micromamba", "run", "-n", "aigc", "python", "app.py"]
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: CAD and 3D Agent
3
+ colorFrom: blue
4
+ colorTo: green
5
+ sdk: docker
6
+ app_port: 7860
7
+ pinned: false
8
+ ---
9
+
10
+ # CAD and 3D Agent
11
+
12
+ A conversational agent for generating precise CadQuery CAD models and image-to-3D assets.
13
+
14
+ ## Required Secrets
15
+
16
+ Configure these as Hugging Face Space secrets:
17
+
18
+ - `MODEL_ID`
19
+ - `ANTHROPIC_BASE_URL`
20
+ - `ANTHROPIC_API_KEY` or the auth variable required by your Anthropic-compatible endpoint
21
+ - `LUX3D_API_KEY`
22
+
23
+ ## Runtime Storage
24
+
25
+ Set `AIGC_ARTIFACT_ROOT=/data/outputs` for persistent generated models and manifests on Hugging Face Spaces.