Articles on Trending Technologies

Technical articles with clear explanations and examples

Golang Program to get the index of the substring in a string

Akhil Sharma
Akhil Sharma
Updated on 17-Feb-2023 4K+ Views

In the Go programming language, strings are a built-in data type that represents sequences of characters. They are defined using double quotes (") and can contain any valid Unicode characters. A substring is a portion of a string that contains a sequence of characters from the original string. A substring can be obtained in Go by using the slicing syntax on a string value. In this article we are going to learn different methods to get the index of a substring in a string using golang programming. Method 1: Using a For Loop In this method, the function that we ...

Read More

How to save all Docker images and copy to another machine?

Hemant Sharma
Hemant Sharma
Updated on 17-Feb-2023 6K+ Views

Introduction Docker images are the building blocks of containerized applications. They are lightweight, portable and can be easily shared between different machines. In this article, we'll take a look at how to save all Docker images on one machine and transfer them to another machine. Method 1: Using docker save and docker load One way to save and transfer Docker images is by using the docker save and docker load commands. The docker save command allows you to save one or more images to a tar archive, which can then be transferred to another machine. The docker load command allows ...

Read More

How to flatten a Docker image?

Hemant Sharma
Hemant Sharma
Updated on 17-Feb-2023 4K+ Views

Introduction Flattening a Docker image is the process of creating a new, single-layer image from an existing multi-layer image. Flattening an image can be useful in a variety of scenarios, such as reducing the size of the image, improving the performance of the image, or simplifying the image for easier distribution. A flattened Docker image is an image that consists of a single layer, containing all the files and metadata required for the image to function. This is in contrast to a multi-layer image, which consists of multiple layers stacked on top of each other, each containing a subset of ...

Read More

How to execute a script when I terminate a Docker container?

Hemant Sharma
Hemant Sharma
Updated on 17-Feb-2023 3K+ Views

Introduction Executing a script upon container termination is the process of running a script or command when a Docker container is stopped or removed. This can be useful in a variety of scenarios, such as cleaning up resources, logging information, or triggering other actions. Container termination refers to the process of stopping or removing a Docker container. This can be done manually using the docker stop or docker rm commands, or automatically through the use of container orchestration tools or container lifecycle management features. Example 1: ONBUILD To execute a script upon container termination using the ONBUILD Dockerfile command, follow ...

Read More

How to cache the RUN npm install instruction when docker builds a Dockerfile?

Hemant Sharma
Hemant Sharma
Updated on 17-Feb-2023 9K+ Views

Introduction When building a Docker image, one of the most time-consuming and resource-intensive steps is running the "RUN npm install" instruction. This instruction installs all the dependencies listed in your package.json file. Caching the results of this instruction can greatly improve the build time of your image. In this article, we will explore different strategies for caching the "RUN npm install" instruction in a Dockerfile. Caching Strategies There are several strategies for caching the "RUN npm install" instruction in a Dockerfile. These include − Using a .dockerignore file − This strategy involves excluding the node_modules directory from being copied ...

Read More

How many CPUs does a docker container use?

Hemant Sharma
Hemant Sharma
Updated on 17-Feb-2023 18K+ Views

Introduction Docker containers are a popular way to package and deploy applications. One of the key features of containerization is the ability to isolate resources and limit their usage. In terms of CPU, it is important to know how many CPUs a container can use, as this can greatly impact the performance of the application running inside the container. This article will cover the concepts of CPU resource allocation in Docker, determining the number of CPU available to a container, configuring CPU resources for a container, and advanced techniques for managing CPU resources. Understanding these concepts will help ensure that ...

Read More

How can I use a variable inside a Dockerfile CMD?

Hemant Sharma
Hemant Sharma
Updated on 17-Feb-2023 12K+ Views

Introduction Using variables in a Dockerfile CMD can greatly improve the flexibility and maintainability of container configuration. Hardcoding values in a CMD instruction can make it difficult to update or modify the container's configuration in the future. Using variables allows for more dynamic and reusable configurations. Prerequisites The prerequisites for using variables inside a Dockerfile CMD depend on the method you choose to use − Using shell expansion − No specific prerequisites are required. Using the ENV instruction − No specific prerequisites are required. Using the ARG instruction − No specific prerequisites are required. Passing variable at runtime − ...

Read More

Docker add network drive as volume on windows

Hemant Sharma
Hemant Sharma
Updated on 17-Feb-2023 11K+ Views

Introduction When working with Docker on Windows, it is possible to use network drives as volumes. This allows you to store data on a network drive and access it from within a Docker container. This can be useful in situations where you need to share data between containers, or between the host and the container. With network drive as volume, you can easily store, manage and backup your data in a centralized location and use it with multiple Docker containers. In this article, we will explore the process of adding network drives as volumes in Docker on Windows, and the ...

Read More

Workflow of MLOps

Neetika Khandelwal
Neetika Khandelwal
Updated on 17-Feb-2023 538 Views

The purpose of MLOps, is to standardize and streamline the continuous delivery of high performing models in production by combining ML systems development (dev) with ML systems deployment (ops). It aims to accelerate the process of putting machine learning models into operation, followed by their upkeep and monitoring. An ML Model must go through a number of phases before it is ready for production. These procedures guarantee that your model can appropriately scale for a wide user base. You'll run into that MLOps workflow. Why MLOps? Data ingestion, data preparation, model training, model tuning, model deployment, model monitoring, explainability, and ...

Read More

Evaluating MLOps Platform

Neetika Khandelwal
Neetika Khandelwal
Updated on 17-Feb-2023 432 Views

An MLOps platform's goal is to automate tasks associated with developing ML-enabled systems and to make it simpler to benefit from ML. Building ML models and gaining value from them requires several stages, such as investigating and cleaning the data, carrying out a protracted training process, and deploying and monitoring a model. An MLOps platform can be considered a group of tools for carrying out the duties necessary to reap the benefits of ML. Not all businesses that benefit from machine learning use an MLOps platform. Without a platform, it is absolutely possible to put models into production. Choosing and ...

Read More
Showing 40461–40470 of 61,297 articles
Advertisements