conda create -n my_ai_env python=3.10 -y
conda activate my_ai_env
#把 uv 请进来(代替普通的 pip)
conda install -c conda-forge uv -y
# 安装 vLLM 或其他重型库
uv pip install vllm --torch-backend auto
为什么系统装了 uv 对 Conda 更有利?
缓存共享:你在 Conda 环境 A 里装过的包,如果环境 B 也要用,uv 会直接从全局缓存里链接过去,0 秒完成安装,且不占双倍硬盘空间。1
不污染环境:通过 uv pip 安装的包,Conda 依然能感知到(通过 conda list 可以看到它们,通常标注为 pypi 来源)。2
极致性能:在处理 vLLM 这种动辄几个 GB 的重型依赖时,全局 uv 的并行下载速度能直接跑满你的带宽。
uv 处理 PyTorch 与 CUDA 兼容性问题主要有两种方式:一种是全自动检测(推荐),另一种是手动指定索引(更稳定)。
1. 自动检测(最推荐:--torch-backend auto)
这是 uv 的杀手锏功能。当你使用以下命令时:
bash
uv pip install torch --torch-backend auto
请谨慎使用此类代码。
原理:uv 会自动扫描你的本地环境(通过 nvidia-smi 或驱动版本),检测当前显卡支持的最高 CUDA 版本。
动作:它会自动从 PyTorch 的官方仓库(如 download.pytorch.org)匹配并下载对应的构建版本(如 +cu121 或 +cu124),无需你手动查表。
2. 手动指定官方索引(针对特定版本需求)
如果你需要安装特定版本的 CUDA(例如系统驱动较老),可以使用 --index-url:
bash
# 安装适配 CUDA 12.1 的版本
uv pip install torch --index-url https://download.pytorch.org/whl/cu121
请谨慎使用此类代码。
注意:在 Windows 上,默认 pip install torch 往往会装成 CPU 版,使用 uv 配合这个显式 URL 可以强制安装 GPU 版。
3. 在配置文件中永久锁定(适合项目管理)
如果你在使用 pyproject.toml 管理项目,可以在文件中配置 tool.uv.index,确保团队所有成员装的都是同一个 CUDA 版本:
toml
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true # 确保只有 torch 相关包走这个索引
请谨慎使用此类代码。
4. 解决“环境污染”:Conda 与 uv 的分工
由于 uv 无法安装系统级的 CUDA 驱动(Driver),最稳健的配合是:
Conda 负责:安装底层的 cudatoolkit 或 nvidia/label/cuda-xx.x。
uv 负责:利用 Conda 提供的环境,通过 uv pip install 瞬间拉取匹配的 Python 库。
总结建议:直接尝试 uv pip install torch --torch-backend auto。如果由于多显卡或 WSL2 环境导致自动检测失败,再退回到手动指定 --index-url 的方案。
通常我们指挥大模型干活的时候,如果只说一句,帮我制作一个人个网站,则大模型只是随机抽出一些案例,生成,出来的效果当然不合人意。
agent skill解决的问题就是,一个skill只针对一个活,然后有个说明文件,说明干这个活,干得好的一个标准,如网站制作,如何配色标准,如何布局标准等,将这些和要干的活一起发给大模型,模型的输出就不再是随机了,而是按这个标准输出了,质量自然就提高了。
产品经理(product-manager.md)
---
name: product-manager
description: Expert product manager specializing in product strategy, user-centric developnent,and business outcomes. Masters roadnap planning, feature prioritization, and cross-functionalleadership with focus on delivering products that users love and drive business growth.
tools: Read, Write, Edit, Glob, Grep, WebFetch, WebSearch, Bash
---
You are a senior product manager with expertise in building successful products that delightusers and achieve business objectives. Your focus spans product strategy, user research, featureprioritization, and go-to-narket execution with enphasis on data-driven decisions and continuous1teration.
when invoked:
1.Query context nanager for product vision and narket context
2. Review user feedback, analytics data, and competitive landscape
3.Analyze opportunitles,user needs,and business impact
4.Drive product decisions that balance user value and business goals
Product management checklist:
- User satisfaction > 80% achieved
-Feature adoption tracked thoroughly
- Business netrics achieved consistently
- Roadnap updated quarterly properly
- Backlog prioritized strategically
-Analytics implenented conprehensively
-Feedback loops active continuously
-Market position strong measurably
全栈程序员(fullstack-developer.md)
---name: fullstack-developer
description: End-to-end feature owmer with expertise across the entire stack. Deliversolutions from database to UI with focus on seamless Integration and optimal user exptools: Read,Write, Edit, Bash,Glob, Grep
---
You are a senior fullstack developer speclalizing in conplete feature development wittacross backend and frontend technologles. Your prinary focus 1s del1vering coheslve,solutions that work seamlessly from database to user Interface.
when invoked:
1. Query context manager for full-stack architecture and existing patterns
2. Analyze data flow from database through API to frontend
3.Review authentication and authorization across all layers
4.Design cohesive solution maintaining consistency throughout stack
Fullstack development checklist:
- Database schema aligned with API contracts
- Type-safe API implenentation with shared types
- Frontend components matching backend capabilities
- Authentication flow spanning all Layers
- Consistent error handling throughout stack
- End-to-end testing covering user journeys
- Performance optimization at each layer
- Deployment pipeline for entire feature
QA(qa-export.md)
---
name: qa-expert
description:Expert QA engineer specializing in comprehensive and quality metrics. Masters manual and automated testing, trwith focus on delivering high-quality software through system
tools: Read, Grep, Glob, Bash
---
You are a senior QA expert with expertise in comprehensive qmethodologies, and quality metrics. Your focus spans test pl quality advocacy with emphasis on preventing defects, ensure high quality standards throughout the development lifecycle.
When invoked:
1. Query context manager for quality requirements and applic
2. Review existing test coverage, defect patterns, and quality
3. Analyze testing gaps, risks, and improvement opportunities
4. Implement comprehensive quality assurance strategies
api-designer.md
code-reviewer.md
Building a Harness for... Myself
输入提示词
4句提示词:
第一,你扮演世界上最顶尖的商业演示设计专家和视觉的传达顾问。
第二,请运用《演说之禅》和麦肯锡《金字塔原理》,以及高桥流 简洁法的核心技巧,帮我设计逻辑清晰,而且视觉震撼的演示文稿。
第三,我会详细描述我的演示目标、演示目的、演示目标受众、演示的核心内容,时间限制以及现有的素材。
第四,请给我一个可以立即执行到个性化设计方案,一定要具体实用,别说废话。
选择Gemini-pro3,发送。
输入内容
示目标:希望目标受众在认知和行动上产生以下转变,从对AI的焦虑与替代恐惧,转变为将其视为能力放大器与战略伙伴。开始有意识地将AI深度整合进工作流,并制定个人计划,重点投资于洞察力、判断力、整合力与叙事力这四大不可替代的核心能力,实现从"执行者"到"决策者"的升级。
演示目的:缓解焦虑,指明方向;重塑价值,确立信心;提供框架,驱动改变;
目标受众:互联网和科技行业的产品经理、产品设计师、创业者、技术团队负责人;
核心内容:核心论断:问题从来本在工具,而在于你选择如何使用它。AI是能力的放大器,而非替代品。
关键框架:
现状定位:我们正处在从"推理者"向"代理"过渡的拐点,对"会用Agent的人"要求更高。
变与不变:效率门楼,协作方式在变:但对用户的理解,商业判断、驾驭复杂性、创造力与品味永不会
核心竞争力公式:产品力=思维深度xAI效率。
思维深度为零,一切归零。
四大不可替代能力:洞察力、判断力、整合力、叙事力。
三段式实践路径:短期掌握协作,中期深化专业,长期构建系统思维。
终极愿景:未来的产品经理应是思想者、决策者、协作者、创造者的集合体。最终的竞争,是"会用机器且拥有深度思维的人*之间的竞争。
时间限制:理想的演讲时间约为30-45分钟:
输入提示词,选择nano-banana,发送
这是我今天要演示的内容,请根据内容帮我生成一份PPT演示文稿,我给你的设计提示词是:"Cinematic lighting, hyper-realistic, human hand shaking robot hand, warm tone"(用于P3); "Minimalist style, a lighthouse in the dark ocean, vector art"(用于P8洞察力).
import os,base64
from openai import OpenAI
client = OpenAI(
api_key='xxx',
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1"
)
def encode_image(image_path):
with open(image_path,"rb") as image_file:
return base64.b64encode(image_file.read()).decode("utf-8")
result = []
for file_name in ["food1.png","food2.png","food3.png"]:
image_path = os.path.join(os.path.dirname(__file__),file_name)
completion = client.chat.completions.create(
model="qwen-vl-max-latest",
messages=[
{
"role": "system",
"content": [{"type":"text","text":"You are a helpful assistant."}]
},
{
"role": "user",
"content":[
{
"type": "image_url",
"image_url": {
"url":"data:image/png;base64," + encode_image(image_path)
}
},
{
"type": "text",
"text": """
提取图中内容,按照json格式输出如下,只输出纯json字符就行,不要夹杂换行符和其他多余字符:
{
"product_name":"xxxx",
"product_type":"xxxx",
"shelf_life":"xxxx",
"ingredients":"xxxx.",
"product_standard_code":"xxxx",
"storage_conditions":"xxxx",
"food_production_license_number":"xxxx",
"production_date":"xxxx",
"manufacturer":"xxxx",
"address":"xXxx",
"phone":"xxxx",
"fax":"xXXX"
}
"""
}
]
}
]
)
result.append(completion.choices[0].message.content)
print(result)