/pydesk

A containerized desktop to run machine learning demos.

Primary LanguageMakefile

pydesk

This repository provides Dockerfiles to build a CentOS / Python 3 based image capable of running demonstrations from the pyprobml repository.

You must have docker installed; then,

make

If you want to see what will go on first,

make -n

will display the commands to be executed, without actually executing.

Alternatively, instead of building the pydesk image, you can also pull the image from docker.io

docker pull krkeane/pydesk:latest

To launch the pydesk container,

docker run --privileged -p nnnn:5901 -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d pydesk

for the image you built or

docker run --privileged -p nnnn:5901 -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d krkeane/pydesk

for the image you pulled. In both cases, nnnn is an available port number on the docker host, for example 5901 would work if no one else is using it.

You may access your pydesk container using a VNC viewer.

  • If you are running the VNC viewer on the same machine running the docker container, the VNC desktop is reached at localhost:nnnn.
  • If you are running the container elsewhere, setup a ssh tunnel from the vncviewer machine to the docker machine. With a tunnel from port mmmm on your vncviewer machine to port nnnn on the docker machine, the VNC desktop is reached at localhost:mmmm.
  • The user name is demoUser. The password is demodemo.

Once you are viewing your VNC desktop,

  • right mouse / Applications / Settings / Display to set your desired resolution
  • open a terminal; cd ~/git/probml, and follow the README.md instructions. 85+ demos will work fairly well. A few kick up dust. If you clean up the code, please send a pull request (either to this repository or to the probml/pyprobml repository).

Enjoy!

For cleanup, there is

make clean

It aggressively eliminates docker artifacts, so don't do this if you want to keep the contents of a container or keep an image on your docker machine. To see what will happen, without actually doing anything,

make -n clean