Launching GUI Application On Docker

If we are building a UI application and deploying it on a docker container. And we want that UI application to display the user interface screen on your local machine while running the application inside the docker container, we have to connect the display of the Docker container with the display of Local Machine. So, here we want Jupyter Notebook which runs on a browser to be run inside docker container.

For any Graphical user interface (GUI) application to run,we need Xserver.

What is XServer?

On Unix-like operating systems, X, typically located at /usr/bin/X, is the original X server executable of MIT’s X Window System. Typically, you do not need to run X manually. If what you’d like to do is start a new X Window session, use the startx command instead.

To Configure Xserver we have to use following command:

Run command yum install python3 to install python in the docker container.

Now, to run jupyter notebook, we should have a browser. So here i am installing firefox browser inside the container using command yum install firefox.

Now, lets install jupyter. pip3 install jupyter.

Now we have to create a workspace where we store our jupyter notebook to train our model.

We have to transfer our dataset from RHEL8 host to our container.For that open a new terminal and type below command.

We need to install some python library to do our work.Used the coomand:pip3 install pandas numpy scikit-learn

To run the jupyter notebook we have to used following command: jupyter notebook — allow-root

Create new python3 notebook

And in this notebook we can train our ML model.

Thanks for reading.




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

On Complexity in Software Systems

Analog to Digital Conversion in STM32F4 Microcontroller

Strangers-turned-teammates build a virus relief community service platform

Using Nodemailer — Easy as pie.

Weekly update on development process (Nov 29, 2021)

Firebase’s Firestore rules: What the F? Part 2

Feature Flags: Release Small and Often, Simplify Workflow

The One Quality That Sets Senior Engineers Apart From Everyone Else

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhinandan Nahar

Abhinandan Nahar

More from Medium

Configure K8S Multi Node Cluster over AWS Cloud using Ansible Roles

Docker Installation in Windows System through Oracle Virtual Box

Keycloak tutorial series — Part 3 Keycloak User Federation

How to build and push docker image to container registry