Prepare paddle in Docker

本文介绍如何通过Docker安装并配置PaddlePaddle环境,包括安装Docker、从中国镜像源拉取镜像、运行交互式终端、安装Git、克隆PaddlePaddle教程代码等步骤,并提供了快速启动PaddlePaddle Book交互式Jupyter Notebook的方法。

1. Install Docker

sudo apt-get install -y docker.io

a) pull repository from server in China, here is a faster mirror:

sudo docker pull docker.paddlepaddle.org/paddle

b)run an interactive terminal

sudo docker run -i -t docker.paddlepaddle.org/paddle /bin/bash

c)Install git in container

   apt-get install git

d)Clone paddle tutorial code

   git clone https://github.com/PaddlePaddle/book.git

e)Open another terminal and commit the conntainer

     sudo docker container ls

     sudo docker commit -m="Add git and clone padddlepaddle tutorial code" -a="chenrufeng" c6ec649e0f08 paddle_tutorial:v1

 

You can create a container serving PaddlePaddle Book using Jupyter Notebook in one minute using Docker. PaddlePaddle Book is an interactive Jupyter Notebook for users and developers.If you want to dig deeper into deep learning, PaddlePaddle Book definitely is your best choice.

We provide a packaged book image, simply issue the command:

docker run -p 8888:8888 paddlepaddle/book

Then, you would back and paste the address into the local browser:

http://localhost:8888/

That’s all. Enjoy your journey

or, use command line to start updated paddle

```

sudo docker run -p 8888:8888 paddle_book:v2 jupyter notebook --allow-root --ip=0.0.0.0
```

转载于:https://www.cnblogs.com/freebird92/p/8316283.html

PS C:\Users\31753\Desktop\ocr> & C:\Users\31753\AppData\Local\Microsoft\WindowsApps\python3.11.exe c:/Users/31753/Desktop/ocr/ain.py c:\Users\31753\Desktop\ocr\ain.py:20: DeprecationWarning: The parameter `use_angle_cls` has been deprecated and will be removed in the future. Please use `use_textline_orientation` instead. ocr = PaddleOCR(use_angle_cls=True, lang='ch') # 初始化OCR引擎 Warning with import paddle: you should not import paddle from the source directory; please install paddlepaddle*.whl firstly.Traceback (most recent call last): File "c:\Users\31753\Desktop\ocr\ain.py", line 20, in run ocr = PaddleOCR(use_angle_cls=True, lang='ch') # 初始化OCR引擎 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddleocr\_pipelines\ocr.py", line 161, in __init__ super().__init__(**base_params) File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddleocr\_pipelines\base.py", line 66, in __init__ self.paddlex_pipeline = self._create_paddlex_pipeline() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddleocr\_pipelines\base.py", line 99, in _create_paddlex_pipeline kwargs = prepare_common_init_args(None, self._common_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddleocr\_common_args.py", line 61, in prepare_common_init_args device = get_default_device() ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddlex\utils\device.py", line 42, in get_default_device import paddle File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddle\__init__.py", line 38, in <module> from .base import core # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddle\base\__init__.py", line 38, in <module> from . import ( # noqa: F401 File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddle\base\backward.py", line 28, in <module> from . import core, framework, log_helper, unique_name File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddle\base\core.py", line 64, in <module> raise e File "C:\Users\31753\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\paddle\base\core.py", line 44, in <module> os.add_dll_directory(third_lib_path) File "<frozen os>", line 1119, in add_dll_directory FileNotFoundError: [WinError 2] 系统找不到指定的文件。: 'C:\\Users\\31753\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\paddle\\base\\..\\libs'
最新发布
07-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值