基础镜像:nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04
apt update
apt install vim
# tusinghua
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
sudo tar -zxvf ./cudnn-8.0-linux-x64-v5.1.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp -a cuda/lib64/libcudnn* /usr/local/cuda/lib64
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
步骤1:添加ppa到系统
apt-get install python-software-properties
apt-get install software-properties-common
add-apt-repository ppa:jonathonf/python-3.6
步骤2 更新:
apt-get update
步骤3 安装:
apt-get install python3.6
步骤4 删除软连接
rm /usr/bin/python
步骤5 建立软连接
ln -s /usr/bin/python3.6 /usr/bin/python
步骤6 安装pip
curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6
ln -s /usr/local/bin/pip3 /usr/bin/pip
apt install openssh-server curl
基础镜像:sitonholy/scm:16.04-10.0-7.4-3.6
1 .安装cmake等依赖
apt install openssh-server curl
apt-get install -y cmake build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg.dev libtiff4.dev libswscale-dev libjasper-dev
2 .下载OpenCV-4.1.0
apt install git
git clone https://github.com/opencv/opencv/tree/4.1.0
3 .编译
Cmake一下
$cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
4 . 安装
$make -j32
$sudo make install
5.安装python-Opencv
可直接使用apt安装
sudo apt-get install python-opencv
sudo apt-get install python-numpy
6.安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python opencv-contrib-python
7.测试
打开python,importcv模块成功即可。
import cv2
基础镜像:sitonholy/scm:16.04-10.0-7.4-3.6-4.1.0
# 深度学习相关库
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch torchvision tensorboardx
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu keras
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple mxnet-cu100mkl
# 机器学习相关
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple sklearn matplotlib pandas numpy Pillow
# 学习工具
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter jupyterlab
root@0b5957d695d9:/# pip list
Package Version
--------------------- ----------------------
absl-py 0.7.1
astor 0.8.0
attrs 19.1.0
backcall 0.1.0
bleach 3.1.0
certifi 2019.6.16
chardet 3.0.4
cycler 0.10.0
decorator 4.4.0
defusedxml 0.6.0
entrypoints 0.3
gast 0.2.2
google-pasta 0.1.7
graphviz 0.8.4
grpcio 1.22.0
h5py 2.9.0
idna 2.8
ipykernel 5.1.1
ipython 7.6.1
ipython-genutils 0.2.0
ipywidgets 7.5.0
jedi 0.14.1
Jinja2 2.10.1
joblib 0.13.2
json5 0.8.5
jsonschema 3.0.1
jupyter 1.0.0
jupyter-client 5.3.1
jupyter-console 6.0.0
jupyter-core 4.5.0
jupyterlab 1.0.2
jupyterlab-server 1.0.0
Keras 2.2.4
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
kiwisolver 1.1.0
Markdown 3.1.1
MarkupSafe 1.1.1
matplotlib 3.1.1
mistune 0.8.4
mxnet-cu100mkl 1.4.1
nbconvert 5.5.0
nbformat 4.4.0
notebook 5.7.8
numpy 1.14.6
opencv-contrib-python 4.1.0.25
opencv-python 4.1.0.25
pandas 0.24.2
pandocfilters 1.4.2
parso 0.5.1
pexpect 4.7.0
pickleshare 0.7.5
Pillow 6.1.0
pip 19.1.1
prometheus-client 0.7.1
prompt-toolkit 2.0.9
protobuf 3.9.0
ptyprocess 0.6.0
pycurl 7.43.0
Pygments 2.4.2
pygobject 3.20.0
pyparsing 2.4.0
pyrsistent 0.15.3
python-apt 1.1.0b1+ubuntu0.16.4.5
python-dateutil 2.8.0
pytz 2019.1
PyYAML 5.1.1
pyzmq 18.0.2
qtconsole 4.5.1
requests 2.22.0
scikit-learn 0.21.2
scipy 1.3.0
Send2Trash 1.5.0
setuptools 41.0.1
six 1.10.0
sklearn 0.0
ssh-import-id 5.5
tensorboard 1.14.0
tensorboardX 1.8
tensorflow-estimator 1.14.0rc1
tensorflow-gpu 1.14.0
termcolor 1.1.0
terminado 0.8.2
testpath 0.4.2
torch 1.1.0
torchvision 0.3.0
tornado 6.0.3
traitlets 4.3.2
unattended-upgrades 0.1
urllib3 1.25.3
wcwidth 0.1.7
webencodings 0.5.1
Werkzeug 0.15.4
wheel 0.29.0
widgetsnbextension 3.5.0
wrapt 1.11.1
Content type
Image
Digest
Size
147.2 MB
Last updated
over 5 years ago
docker pull sitonholy/scm:v1