Novice to Confident Builder: My Docker Odyssey

Muhit KhanMuhit Khan
4 min read

Hey reader! Today, I want to share my journey with Docker, a story that began with an academic project and turned into a quest for Docker learning awesomeness. Buckle up, because this isn't your average tech blog post โ€“ it's a tale of perseverance, problem-solving, debugging, and the thrill of conquering new challenges.

Facemetric Authentication: Securing Web Apps with a Facial Twist

It all started with my academic minor project, I have been assigned to build in the 6th semester of my Bachelor in Computer Science Engineering. I envisioned a way to boost the security of web applications by adding an extra layer of authentication โ€“ an AI-powered face recognition service! Imagine using your device's camera to snap a selfie, and that selfie becomes your key to unlocking the web app. Pretty cool, right?

To bring this vision to life, I built my AI-based Face Authentication Model, 'Facemetric Authentication' which will run within a Flask server that would act as a REST API service. This server would take two photos as input: a reference image (like a stored selfie) and a live image captured on the login page. My AI model, built with Python 3.10 and powered by TensorFlow (which works wonders on GPUs!), would then compare the two photos and verify if it's the real you trying to log in.

Docker Dilemma: Transitioning Challenges into Success

Here's where things got interesting. With the dream in place, I needed a way to make my project accessible and developer-friendly. Here comes Docker! I wanted to create a system where people could easily run on any device, but there was a catch โ€“ I had absolutely no prior experience with Docker. Talk about a challenge!

Bravely, I started a journey to learn new things. YouTube became my classroom, the official Docker documentation my textbook. It wasn't a smooth ride initially. Installing Docker on my machine was a battle in itself. WSL2 (Windows Subsystem for Linux 2) became a temporary foe before I finally wrestled it under control.

The Power of the Dockerfile and the Exploration of Images

Next came the mighty Dockerfile, the holy grail of creating Docker images. This was where the real magic would happen. YouTube once again became my guide as I explored the fascinating world of base images. These pre-built images from Docker Hub and GitHub Package are like Lego sets for developers, allowing us to build upon them for specific purposes.

With newfound confidence (and a healthy dose of practice! ๐Ÿ˜Œ), I jumped into writing Dockerfile for my own purpose. It was a process of learning, experimenting, and hitting a few bumps along the road. But hey, that's how we learn, right?

Debugging with Chat GPT, Gemini, and the Community

My journey wasn't a solo act. When I got stuck, I had a secret weapon โ€“ the power of collaboration! Chat GPT and Gemini (large language models like myself๐Ÿ˜ƒ) became my debugging buddies, helping me verify code and identify issues. Stack Overflow and Docker community forums were my lifelines, offering insights and solutions from fellow tech warriors.

Milestone: Docker Image Fits for Many Devices

Finally, the moment arrived! I successfully built a Docker image containing my pre-developed face recognition model. The joy of seeing it run flawlessly across different devices was indescribable. But wait, the story doesn't end there with happy face!

The Challenge of Missing 'CUDA'

Here's the thing: my face recognition model relies on TensorFlow, which typically uses Nvidia CUDA cores for enhanced performance. But in the world of Developers, there's no guarantee a CUDA driver will always be available. This meant my beta version faced compatibility issues on many devices.

This was a hurdle I wasn't expecting. Resources on this specific issue were scarce, forcing me to think outside the box. I reached out to senior experts, and after a significant period of intense trial and error, bingo! The solution involved installing OpenGL drivers and libraries within the image. This allowed TensorFlow to run on the CPU instead of relying on the missing Nvidia CUDA cores.

From Academic Projects to Open-Source

Today, my Dockerized face recognition system 'Facemetric Authentication' is up and running, ready to be shared with the world as an open-source project and I'll continue to take this project some more steps ahead. You can also pull the image and use it for any of your own authentication projects whether it's a Web App or Mobile App.

Link to Facemetric Authentication: https://hub.docker.com/repository/docker/muhitkhan/facemetric-authentication/

The Takeaway: Embrace the Challenge, Conquer the Unknown

This journey has been an incredible learning experience, not just for Docker but also for perseverance and resourcefulness. And this is more than just a blog post; it's a call to action.

My fellow tech enthusiasts, don't be afraid to tackle new technologies, even if they seem daunting at first. Remember, there's a whole community out there ready to help, and the satisfaction of overcoming a challenge is priceless. So, dive into the world of Technology, explore its potential, and who knows, you might just become the next open-source hero!

0
Subscribe to my newsletter

Read articles from Muhit Khan directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Muhit Khan
Muhit Khan

Coding The Way to Tomorrow