This repo is a fork to the modular docker machine learning environment deepo which add extra functions include ffmpeg support to opencv, remote server x11 forwarding, better user permission management and more python modules. Keep in mind that not all functions are tested.
- Socat (For remote usage)
sudo apt install -y socat
- Edit sshd settings (For remote usage)
use your text editor to edit /etc/ssh/sshd_config set X11Forwarding to yes set X11UseLocalhost to no
- Clone the repo
git clone https://github.com/dayta-ai/deepo.git
- Install XQuartz (For Mac only)
- add execution permission to start_local.sh
cd deepo
chmod u+x start_local.sh
- Build docker image and run the container, the container will be removed after you exit from bash
./start_local.sh -d your_name
- add execution permission to start_local.sh
cd deepo
chmod u+x start_local.sh
- Build docker image and run the container, the container will be removed after you exit from bash
./start_local.sh -d your_name
- ssh to your remote workstation with x11 forwarding flags
ssh -XY my_workstation
- add execution permission to start_remote.sh
cd deepo
chmod u+x start_remote.sh
- Build docker image and run the container, the container will be removed after you exit from bash
./start_remote.sh -d your_name
By default, the base docker image is prebuild by us and host by dockerhub, here are the included libraries and tools
- ubuntu 18.04
- cuda 10.0 and cudnn 7
- python 3.7
- opencv with ffmpeg support
- pytorch 1.1 + torchvision 0.3 / pytorch 1.2 + torchvision 0.4 & apex
- jupyer and jupyter lab
- tensorflow 1.14 & keras
- mxnet
- sklearn
- onnx
- vim and nano
- net-tools
docker pull dayta/ml_developmen:latest
Please follow the guide from original deepo repo
cd generator
python generate.py Dockerfile python==3.7 pytorch==1.3 apex jupyter jupyterlab tensorflow==1.14 keras onnx opencv sklearn pylint mxnet --ubuntu-ver 18.04 --cuda-ver 10.1 --cudnn-ver 7
docker build -t {IMAGE_NAME} .
cd generator
python generate.py Dockerfile python==3.7 pytorch==1.3 apex jupyter jupyterlab tensorflow==1.14 keras onnx opencv sklearn pylint mxnet --deepstream
docker build -t {IMAGE_NAME} .
- Container name
DeveloperName_Project_index
The suffix of container name indicate the index of container, you can multiple containers at the same time by run start.sh multiple times. To do: make container index incremental Containers from different developers are distinguished by the DEVELOPER_NAME prefix
- User password
The default password is docker, feel free to change it in the outer Dockerfile
- Webcam
Currently you have to add --privileged argument to docker run command in start.sh in order to use webcam
Updated: no privileged is needed to access webcam from container, all webcams under /dev/ will be mounted
- Multiple GPUs
If the host machine has multiple GPUs, you can specify the GPUs you want to use by setting GPU variable in the script. By default first one is chosen.
- Initialization script
An initilaization script(scripts/init.sh) is used to run commands when the container starts. For example, Jupyter notebook is automatically started with the container. Each container is associated with an unique jupyter notebook port, starting from 8888.