- https://cr.console.aliyun.com/cn-hangzhou/instance/repositories
docker pull registry.cn-hangzhou.aliyuncs.com/flystarhe/containers:[镜像版本号]
- https://hub.docker.com/repository/docker/flystarhe/mmdet
docker pull flystarhe/mmdet:[镜像版本号]
2.10-mmcv1.2-torch1.7-cuda10.2
, 2.10-mmcv1.2-torch1.7-cuda11.0
2.11-mmcv1.3-torch1.7-cuda11.0
, 2.11-mmcv1.3-torch1.8-cuda11.1
Run
python mmdet/utils/collect_env.py
to check built environment.
- https://hub.docker.com/repository/docker/flystarhe/torch
docker pull flystarhe/torch:[镜像版本号]
1.7.1-cuda10.2-dev
, 1.7.1-cuda11.0-dev
1.8.1-cuda10.2-dev
, 1.8.1-cuda11.1-dev
CUDA HOME
from torch.utils.cpp_extension import CUDA_HOME
, CUDA architectures withtorch.cuda.get_arch_list()
, NVCC gencode flags withtorch.cuda.get_gencode_flags()
.
- https://hub.docker.com/repository/docker/flystarhe/yolov5
docker pull flystarhe/yolov5:[镜像版本号]
5.0-torch1.8-cuda11.1
, 5.0-torch1.8-cuda11.2-ngc
docker save -o mmdet2.8-21.02.tar mmdet:2.8
docker load -i mmdet2.8-21.02.tar
docker images registry.cn-hangzhou.aliyuncs.com/flystarhe/containers
docker images registry.cn-hangzhou.aliyuncs.com/flystarhe/containers:mmdet*
docker images --filter=reference='*/*/*:mmdet*'
docker build -t flystarhe/python:3.8 -f 3.8 .
export DOCKER_BUILDKIT=1
docker build -t flystarhe/python:3.8 -f 3.8 --target official .
docker run -it --rm --gpus all nvidia/cuda:11.1-base-ubuntu18.04 bash
t=test && docker run -d -p 7000:9000 --ipc=host --name ${t} -v "$(pwd)"/${t}:/workspace flystarhe/python:3.8
t=test && docker run --gpus device=0,1 -d -p 7000:9000 --ipc=host --name ${t} -v "$(pwd)"/${t}:/workspace flystarhe/python:3.8
- http://ip:7000/?token=hi for
dev
/usr/sbin/sshd -D -p 7000
forssh
modepython /workspace/app_tornado.py 7000 ${@:2}
forapp
mode
docker tag local-image:tagname new-repo:tagname
docker push new-repo:tagname
import requests
url = "http://ip:7000/main"
vals = {"image": "/workspace/test.png"}
response = requests.get(url, params=vals)
print(response.status_code)
print(response.text)
response = requests.post(url, data=vals)
print(response.status_code)
print(response.json())
# apt-get install -y openssh-server
# RUN mkdir -p /run/sshd && mkdir -p ~/.ssh && echo "# ssh keys" > ~/.ssh/authorized_keys
# sed -i 's/http:\/\/archive.ubuntu.com/https:\/\/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
# conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
# conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
# rm -rf /etc/apt/sources.list.d/cuda.list /etc/apt/sources.list.d/nvidia-ml.list
# pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
timezone
FROM ubuntu
# 设置localtime
# 此处需要优先设置localtime,否则安装tzdata将会进入时区选择
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# 安装tzdata
RUN apt-get update && apt-get install -y tzdata