Compare commits

..

4 Commits

Author SHA1 Message Date
贺海国
28bd9d3475 feature: 添加pyproject 2026-04-14 13:59:09 +08:00
贺海国
18f04d5f97 feature: 添加dockerfile 2026-04-14 13:56:16 +08:00
贺海国
a2d64d1276 chore: 移除已跟踪的 .env、.DS_Store 和 __pycache__
这些文件不应纳入版本控制,现通过 git rm --cached 移除,
并由 .gitignore 忽略。
2026-04-14 13:53:39 +08:00
贺海国
f233d39d75 feature: gitingore 2026-04-14 13:51:42 +08:00
7 changed files with 97 additions and 3 deletions

BIN
.DS_Store vendored

Binary file not shown.

3
.env
View File

@@ -1,3 +0,0 @@
OPENAI_API_KEY='sk--VnOesEU5D8wnHjdg0MEsA'
OPENAI_BASE_URL='https://llm.dev.maimaiag.com/v1'
OPENAI_MODEL='qwen35b-a3b'

46
.gitignore vendored Normal file
View File

@@ -0,0 +1,46 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# Virtual environments
.venv
venv/
ENV/
env/
# IDEs
.vscode/
.idea/
*.swp
*.swo
*~
# Environment variables
.env
# OS
.DS_Store
Thumbs.db
# Logs
*.log

38
Dockerfile Normal file
View File

@@ -0,0 +1,38 @@
# 使用官方Python运行时作为基础镜像
FROM 172.16.102.3:30648/library/python:3.13-slim
# 设置工作目录
WORKDIR /app
# 设置环境变量
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# 配置uv使用阿里云源
ENV UV_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple/
RUN python -m pip install --upgrade pip setuptools wheel --index-url https://mirrors.aliyun.com/pypi/simple/
# 安装uv
RUN pip install uv --index-url https://mirrors.aliyun.com/pypi/simple/
# 复制依赖文件
COPY pyproject.toml ./
# 安装依赖
RUN uv sync
# 复制应用代码
COPY . .
# 创建非root用户
RUN adduser --disabled-password --gecos '' appuser
RUN chown -R appuser:appuser /app
USER appuser
# 暴露端口
EXPOSE 8000
# 启动命令
CMD ["uv", "run","python", "app.py"]

Binary file not shown.

Binary file not shown.

13
pyproject.toml Normal file
View File

@@ -0,0 +1,13 @@
[project]
name = "qwen3-coder-webdev"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"dashscope>=1.24.6",
"gradio>=5.47.2",
"httpx[socks]",
"modelscope-studio>=1.5.0",
"openai>=1.109.1",
]