使用dockerhub搜索Ubuntu x86
1、拉取镜像
docker pull balenalib/odyssey-x86-ubuntu
2、查看镜像
docker images
3、保存镜像
docker save -o ubuntuX86.tar ubuntu/x86:v1
4、加载镜像
docker load -i ubuntuX86.tar
5、创建并运行容器
docker run -itd balenalib/odyssey-x86-ubuntu:latest /bin/bash
6、进入容器
docker attach 740106afdbad
7、安装anacona
Index of /https://repo.anaconda.com/archive/or
Index of /https://repo.anaconda.com/miniconda/
8、安装工具
apt-get update
apt-get install -y vim
bash Miniconda3-py38_23.9.0-0-Linux-x86_64.sh
pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cpu -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pyyaml -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install seaborn -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install paddlepaddle==2.5.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -U paddleocr -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install shapely -i https://pypi.tuna.tsinghua.edu.cn/simple
9、宿主机中复制项目到docker中
(1)docker ps
(2)docker cp /opt/test/file.txt mycontainer:/opt/testnew