CRNN Docker/nvidia-docker Installation

Source: Internet
Author: User
Tags locale lua git clone

This paper mainly records the use of Docker/nvidia-docker installation depth learning picture text recognition, development of the operating environment.

In the image text recognition, need to use CTPN and CRNN, the server is ubuntu16, but the above two frameworks (GitHub existing) can only run on UBUNTU14. Considering, publishing and other issues, decided to use Docker to build ubuntu14 in Ubuntu16
cuda7.5 CUDNN3 Development of the operating environment.

The CRNN Docker installation is installed on the basis of the CTPN Docker.

Remember to make certain changes to the file before installing it (Cuda compatible):

# Replace Error, diff-22577c98d557ea9eca089e8e84d7f98d
sed-i ' 191s/.*/return thtensor_ (max) (values, indices, T, dim,1);/' detail/ TensorGeneric.h
sed-i ' 195s/.*/return thtensor_ (min) (values, indices, T, dim,1);/' Detail/tensorgeneric.h
Sed-i ' 198s/.*/return thtensor_ (sum) (R, T, dim,1);/' detail/tensorgeneric.h 

The Docker files are as follows:

# based on the previous CTPN from Ctpn_docker maintainer Xiongyu RUN apt-get update && apt-get install-y \ Soft Ware-properties-common \ libssl-dev \ libzmq3-dev \ python-dev \ python-zmq \ sudo # Run Torch7 installation SC Ripts RUN git clone && cd/root/torch && \ b Ash install-deps && \/ # Export Environment variables manually ENV lua_path= '/root/.luarocks/share/ Lua/5.1/?. Lua;/root/.luarocks/share/lua/5.1/?/init.lua;/root/torch/install/share/lua/5.1/?. Lua;/root/torch/install/share/lua/5.1/?/init.lua;. /?. Lua;/root/torch/install/share/luajit-2.1.0-beta1/?. Lua;/usr/local/share/lua/5.1/?. Lua;/usr/local/share/lua/5.1/?/init.lua ' ENV lua_cpath= '/root/.luarocks/lib/lua/5.1/? So;/root/torch/install/lib/lua/5.1/?. So;. /?. So;/usr/local/lib/lua/5.1/?. So;/usr/local/lib/lua/5.1/ ' env path=/root/torch/install/bin: $PATH env ld_library_path=/root/torch/ Install/lib: $LD _libRary_path env dyld_library_path=/root/torch/install/lib: $DYLD _library_path env lua_cpath= '/root/torch/install/lib/ ?. So; ' $LUA _cpath ADD torch-0.1.12.post2-cp27-none-linux_x86_64.whl/root/pytorch_install/ TORCH-0.1.12.POST2-CP27-NONE-LINUX_X86_64.WHL workdir/root/pytorch_install/run pip Install TORCH-0.1.12.POST2-CP27-NONE-LINUX_X86_64.WHL &&\ rm TORCH-0.1.12.POST2-CP27-NONE-LINUX_X86_64.WHL RUN PIP Install torchvision RUN pip install lmdb-i pip install mahotas-i https://p pip install flask-i Install Fblualib and its dependencies:add ADD workdir/root RUN Ch  MoD +x./ run./ # clone the crnn repo:run git Clone RUN Apt-get update && apt-get install-y \ Liblmdb-dev workdir/root/crnn/src RUN CHMOD +x run./ # The following locale is to display the Chinese RUN locale-gen en_US. UTF-8 ENV lang= ' en_US. UTF-8 ' language= ' en_us:en ' lc_all= ' en_US.
 UTF-8 '

Operation Result:

Finally, a Web demo was made based on flask and the results were as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.