Skip to content

supertorpe/docker-python-opencv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-python-opencv

Docker image to develop OpenCV apps with python / jupyter notebooks.

The image provides a virtual framebuffer (xvfb), a minimalistic window manager (jwm) and a VNC server (x11vnc), so you can develop OpenCV apps entirely within the container with no external dependencies.

You only need a VNC client to display the container desktop.

Run container

./start.sh

Now, you can connect your VNC client to localhost:5900 to display the container's desktop.

When Jupyter starts, it outputs the URL to the console:

    To access the notebook, open this file in a browser:
        file:///root/.local/share/jupyter/runtime/nbserver-27-open.html
    Or copy and paste one of these URLs:
        http://755eda89a397:8888/?token=3202be9db2253aac90014fa0394349cfbee2cf52208d5c43
     or http://127.0.0.1:8888/?token=3202be9db2253aac90014fa0394349cfbee2cf52208d5c43

You can access Jupyter with the URL http://127.0.0.1:8888/?token=3202be9db2253aac90014fa0394349cfbee2cf52208d5c43 using the token provided.

OpenCV Development

Your host folder './code' is mounted on the container's folder './app/code'. You can create .py and .ipynb files there and run them within the container.

You can also use Visual Studio Code extension "Dev containers" to attach vscode to the container and develop from there as if you were coding on the host.

I encourage you to install the vscode extension "Python" so that you can debug your code.

Make sure you create .py files from the host -not from the container-, because the container is running with "root" user, so the files you create from the container will belong to "root" user instead of your current user.

Shutting down the container

./stop.sh

About

Docker image to develop OpenCV apps with python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published