118-ocr :root / Y^%@Ft$(Em)0Y7~%&21$8 source /home/pyenv/envhzq/bin/activate cd /qg 安装requests库 pip install requests 安装psycopg2 For PostgreSQL, PostgreSQL 中使用了 pgvector 扩展来存储 CLIP 模型生成的图片特征向量 pip install psycopg2-binary 查看机器的显卡驱动支持哪个版本的 CUDA nvidia-smi 如果是 CUDA Version: 12.2(支持最新的 PyTorch 2.x 稳定版) 安装 PyTorch pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 安装 CLIP 官方 pip install git+https://github.com/openai/CLIP.git 或者 国内 pip install git+https://gitee.com/mirrors/CLIP.git 检查并补齐图像处理库 Pillow pip install Pillow 如果OpenAI CLIP RN50x64自动安装失败,可用下面网址手动下载 https://huggingface.co/jinaai/clip-models/blob/3d6ec9dbc71e0500879a1111923d708cc57ffcb8/RN50x64.pt