Python 官方文档:入门教程 => 点击学习
官网:AutoDL-品质GPU租用平台-租GPU就上AutoDL 1.服务器购买 2.新建虚拟环境 conda create -n tf python=3.8 # 构建一个虚拟环境,名为:tfconda init b
官网:AutoDL-品质GPU租用平台-租GPU就上AutoDL
conda create -n tf python=3.8 # 构建一个虚拟环境,名为:tfconda init bash && source /root/.bashrc # 更新bashrc中的环境变量conda activate tf # 切换到创建的虚拟环境:tf
source /root/.bashrc
从GitHub上下载代码时,可以启用加速。常用的加速:
# 芜湖区export Http_proxy=http://192.168.0.91:12798 && export https_proxy=http://192.168.0.91:12798# 北京A区export http_proxy=http://100.72.64.19:12798 && export https_proxy=http://100.72.64.19:12798#内蒙古A区export http_proxy=http://192.168.1.174:12798 && export https_proxy=http://192.168.1.174:1279#南京新手区export http_proxy=http://172.181.217.43:12798 && export https_proxy=http://172.181.217.43:12798#A100专区export http_proxy=http://172.31.1.127:12798 && export https_proxy=http://172.31.1.127:12798
使用结束后记关闭加速
unset http_proxy && unset https_proxy
# 下载安装工具curl -L -o /usr/bin/arc http://autodl-public.ks3-cn-beijing.ksyun.com/tool/arc && chmod +x /usr/bin/arC# 压缩/打包arc compress xxx.zip path/to/directory# 解压arc decompress xxx.zip 或者解压到指定目录arc decompress xxx.zip path/to/directory
有个别zip的压缩包使用上边的命令以及unzip
命令都不能解压时,先检查文件大小,如果文件大小和源文件一样,那么尝试下面的命令解压:
apt-get update && apt-get install -y fastjarjar xvf xxx.zip
# 将新的Conda虚拟环境加入jupyterlab中conda activate tf # 切换到创建的虚拟环境:tfconda install ipykerneliPython kernel install --user --name=tf # 设置kernel,--user表示当前用户,tf为虚拟环境名称
运行代码时,可能会遇到路径错误的问题,可以用!pwd查看当前位置,然后用os.chdir()修改位置。下图中绿色框为原来位置,红色框为修改后的位置。
为了避免断开连接后,任务中断,可以参考守护进程文档:AutoDL帮助文档
服务器端生成的文件(图片视频权重文件等)无法同步到本地,需要自己下载。
需要注意的是,本地项目文件夹最好不要存放数据集,否则连接服务器会自动上传,而且速度很慢。
pychram连接远程终端:
#方法一:豆瓣镜像网站pip install 安装包名字 -i http://pypi.doubaNIO.com/simple/ --trusted-host pypi.doubanio.com #方法二:豆瓣pip install 安装包名字 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com#方法三:清华大学(推荐)pip install 安装包名字 -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn
# 查看视频from IPython.display import htmlfrom base64 import b64encodevideo = 'demo/demo.mp4' # 视频路径mp4 = open(video,'rb').read()data_url = "data:video/mp4;base64," + b64encode(mp4).decode()HTML("""""" % data_url)
以下两个是我自己保存的镜像
# CUDA 11.1pip3 install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.PyTorch.org/whl/lts/1.8/cu111
来源地址:https://blog.csdn.net/weixin_45231460/article/details/128092503
--结束END--
本文标题: AutoDL使用手册
本文链接: https://www.lsjlt.com/news/433685.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0