hugging-face-down

Hermetic docker images with Hugging Face machine learning models

Hugging Face is GitHub for machine learning models. Their on-the-fly model download scheme, however, is difficult from a DevOps perspective. Here’s how to disable it.

Using Python & Poetry inside Docker

Poetry is a great build system. And in 2023, I believe, no one should use the pip for a private Python codebase. Getting it right inside Docker is a different issue, however. Consider a simple Flask-based web server as an example Bash 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 # Install poetry $ pip3 install poetry==1....

How to deploy Docker images on Microsoft Azure

There are several ways to deploy Docker images on Microsoft Azure. My favorite one is Azure App Service/Web Application for Containers. This is the closest to Google Cloud Run.

Docker: Be careful about the scratch image

After I wrote my previous post, some suggested that I can cut down the image size further by using a “scratch” image. And that’s true, “scratch i"s a reserved 0-sized image with nothing in it. And utilizing a scratch binary image did cut down the size of the final Docker image from 13MB to 7.5MB. Pretty good, right? Except the image cannot do an SSL cert verification because of the missing SSL certs!!! Bash 1 Failed to reach google.com: Get https://google.com: x509: certificate signed by unknown authority

How to deploy side projects as web services for free

In 2020, the web is still the most accessible permission-less platform. For the past few months, I have been playing and building side projects to simplify my life. I started with a Calendar Bot for scheduling events, DeckSaver for downloading decks from Docsend, AutoSnoozer for email management, and StayInTouch for maintaining follow-ups. When I started on this journey, I had the following in my mind. Cost of domain ~ 12$ a year or 1$ a month Cost of a VM ~ 10$ a month

Docker 101: A basic web-server displaying hello world

A basic webserver Docker containers are small OS images in themselves that one can deploy and run without worrying about dependencies or interoperability. All the dependencies are packed in the same container file. And the docker runtime takes care of the interoperability. You are not tied to using a single language or framework. You can write code in Python, Go, Java, Node.js, or any of your favorite languages and pack it in a container. Consider a simple example of a Go-based webserver