cloudstudio 是一个云IDE,一次部署环境,多端开发比较方便,详情见下方链接,不多赘述
cloudstudio简介:https://cloud.tencent.com/product/cloudstudio
源链接:https://doc.weixin.qq.com/doc/w3_AawAogYrAKkJQfjqKWLQtu972EETX?scode=AJEAIQdfAAoOeXyuRm
之前一直有用户反馈CloudStudio的工作空间使用灵活,DIY可玩性较高,但拉取海外仓库速度很慢,不得不转向国内仓库,或者自己想办法加速。基于此类需求,CloudStudio已上线加速代理能力,方便拉取Github仓库与huggingface项目
【使用说明】
目前CPU空间均已配置透明代理,但免费基础型 GPU空间仍需手动配置,目前支持广州、北京、上海、南京四个地域的上网加速。操作步骤如下:
步骤一: 进入https://ide.cloud.tencent.com/dashboard/workspace ,创建基础型GPU空间
步骤二:进入空间后,在终端粘贴下列命令后回车
# 全局环境变量
export http_proxy=http://proxy.cloudstudio.work:8081
export HTTP_PROXY=http://proxy.cloudstudio.work:8081
export https_proxy=http://proxy.cloudstudio.work:8081
export HTTPS_PROXY=http://proxy.cloudstudio.work:8081
export no_proxy=127.0.0.1,localhost,.local,.tencent.com,ppa.launchpad.net
export NO_PROXY=127.0.0.1,localhost,.local,.tencent.com,ppa.launchpad.net
# Git 设置全局代理
git config --global http.proxy http://proxy.cloudstudio.work:8081
git config --global https.proxy http://proxy.cloudstudio.work:8081
# 修复 apt update 失败问题
cp /etc/apt/sources.list /etc/apt/sources.list.bak.`date +'%F-%T'`
sed -i 's/http:\/\/mirrors.cloud.tencent.com/https:\/\/mirrors.cloud.tencent.com/g' /etc/apt/sources.list
# (可选)保存到 bashrc
echo 'export http_proxy=http://proxy.cloudstudio.work:8081' >> ~/.bashrc
echo 'export HTTP_PROXY=http://proxy.cloudstudio.work:8081' >> ~/.bashrc
echo 'export https_proxy=http://proxy.cloudstudio.work:8081' >> ~/.bashrc
echo 'export HTTPS_PROXY=http://proxy.cloudstudio.work:8081' >> ~/.bashrc
echo 'export no_proxy=127.0.0.1,localhost,.local,.tencent.com,ppa.launchpad.net' >> ~/.bashrc
echo 'export NO_PROXY=127.0.0.1,localhost,.local,.tencent.com,ppa.launchpad.net' >> ~/.bashrc
# (可选)保存到 zshrc
echo 'export http_proxy=http://proxy.cloudstudio.work:8081' >> ~/.zshrc
echo 'export HTTP_PROXY=http://proxy.cloudstudio.work:8081' >> ~/.zshrc
echo 'export https_proxy=http://proxy.cloudstudio.work:8081' >> ~/.zshrc
echo 'export HTTPS_PROXY=http://proxy.cloudstudio.work:8081' >> ~/.zshrc
echo 'export no_proxy=127.0.0.1,localhost,.local,.tencent.com,ppa.launchpad.net' >> ~/.zshrc
echo 'export NO_PROXY=127.0.0.1,localhost,.local,.tencent.com,ppa.launchpad.net' >> ~/.zshrc
步骤三:输入 git clone 命令开始拉取仓库到工作空间。例如我们想克隆 comfyui 在github上的仓库。 在终端种输入 git clone 命令,回车即开始加速下载。
git clone https://github.com/comfyanonymous/ComfyUI.git
完整的操作演示如下,怎么样,巨爽!
该手动加速方式也适用于CPU 模板,也可尝试拉取huggingface数据源,例如:
git clone https://huggingface.co/datasets/SakanaAI/AI-CUDA-Engineer-Archive
补充说明:
如果遇到 ollama list 报错,可以执行以下命令:
unset http_proxy HTTP_PROXY