免费资源网 – https://freexyz.cn/
登录账户
export DOCKER_REGISTRY=registry.cn-hangzhou.aliyuncs.com/cqy_test docker login $DOCKER_REGISTRY –username=西交陈清源创建自己的镜像
拉取基础镜像
docker pull registry.cn-shanghai.aliyuncs.com/tcc-public/python:3 #基础镜像地址 #https://tianchi.aliyun.com/forum/postDetail?spm=5176.12586973.0.0.176a4127dBw2Xr&postId=67720获取镜像工具包,根据自己的需求去修改dockerfile
wget http://tianchi-media.oss-cn-beijing.aliyuncs.com/docker-tool/tianchi_docker.zip unzip tianchi_docker.zip或者进入镜像修改
docker run –gpus all -it registry.cn-shanghai.aliyuncs.com/tcc-public/pytorch:1.4-cuda10.1-py3 /bin/bash #测试时如需数据集,则可以将本地路径映射到镜像中 docker run –gpus all -it -v /tmp:/tcdata registry.cn-shanghai.aliyuncs.com/tcc-public/pytorch:1.4-cuda10.1-py3 /bin/bash pip intall *** #新开一个终端 #查看当前容器(运行中的镜像) docker ps #打包生成新的base镜像 docker commit 容器ID registry.cn-shenzhen.aliyuncs.com/test_for_tianchi/test_for_tianchi_submit:base最后执行docker_build.sh或者分步执行:
#构建 docker build -t registry.cn-shenzhen.aliyuncs.com/test_for_tianchi/test_for_tianchi_submit:1.0 . #本地测试 nvidia-docker run your_image sh run.sh #上传 docker push registry.cn-shenzhen.aliyuncs.com/test_for_tianchi/test_for_tianchi_submit:1.0免费资源网 – https://freexyz.cn/
© 版权声明
THE END
暂无评论内容